The film opens with a view of the vast expanse of the Thar desert in the Indian state of Rajasthan. The credit sequence outlines the infiltration of arms and ammunition from Pakistan across the international border into Rajasthan, India. The arsenal makes its way through numerous couriers and gun runners before a part of the consignment ends up in a tribal hamlet in a forest in peninsular India near the town of Chandrapur. A local criminal and gun runner, Bala Thakur, delivers the weapons to a renegade forest-dwelling tribal leader, Veeran (Govind Namdeo), who intends to unleash terror and establish his hegemony in the region. Soon after a bus carrying a wedding party is intercepted by Veeran and his henchmen and the occupants are looted and then massacred. The incident sends shock waves across the country and a stunned political leadership reacts swiftly by assigning the investigation to a special operative team of Mumbai Police Crime Branch. The team lands in Chandrapur and during routine investigations unearths a possible link between the massacre and Bala Thakur, who fled earlier after being warned of the team's impending arrival.
The scene shifts to Ajay Singh Rathod's (Aamir Khan) residence in Colaba, Mumbai and him attending a concert by the famed Pakistani vocalist Gulfam Hassan (Naseeruddin Shah) where he spots a familiar face, Seema (Sonali Bendre). Ajay and Seema had attended the same college in University of Delhi and she had fallen in love with him. He sooner by her actions realises this. During the concert there are intermittent flashbacks to Ajay and Seema's past in Delhi and the tragic turn of events when Ajay loses his elder brother to a terrorist attack in retaliation for Ajay's father (Akash Khurana) agreeing to testify against some terrorists in the court; his father who was abducted is dumped outside his house badly beaten up that leaves him partly paralysed. The grief-stricken family moves to Mumbai where Ajay's kaka (uncle) runs an establishment and Ajay metamorphoses into a determined young man, who devotes himself to becoming an IPS (Indian Police Service) officer. As an ACP (Assistant Commissioner of Police), he makes a good reputation for himself as an honest, tough and diligent cop. Ajay and Seema meet at the end of the concert and cautiously rekindle their relationship. Seema, whose elder brother was the organizer of the concert, introduces him to Gulfam Hassan and after Ajay hands over a recorded collection of Gulfam's earliest recitals, the two become friends.
Meanwhile, the operative team headed by ACP Rathod is working overtime to establish the links between hostile organizations who aim to destabilise India through acts of terrorism, the gun-runners in the local criminal gangs and the Chandrapur massacre. He puts together a team of specialists, though his attempts to ensure the participation of Inspector Salim (Mukesh Rishi) suffer a setback. Salim is an honest and upright police officer who is credited with the best intelligence gathering network in the force. However, a botched attempt at bringing in a notorious gangster Sultan (Pradeep Rawat) results in Sultan escaping and the death of three havaldars (constables). His superiors are furious at what they perceive as his recklessness and he is reassigned to a desk job. A distraught Salim believes that he is being victimised since he is Muslim and refuses to cooperate with Ajay, leading to some friction between the two. Salim however, comes up with a lead on Bala Thakur, when Ajay and his team seemed to have reached a dead end, and the two start working together. An encounter at the criminals' rendezvous results in the death of Bala Thakur and Ajay is seriously injured. Though Sultan and his right-hand man Shiva (Makrand Deshpande) manage to escape, the operation is deemed a success as the team is able to intercept a large consignment of lethal arms and ammunition meant for terrorist acts around the country.
The investigations seemed to have reached a dead end, when a chance clue leads the investigators to Bahid in Rajasthan and to "Mirchi Seth" Rambandhu Gupt (Akhilendra Mishra). The investigative team save for Ajay and Salim camp in Bahid and gather all possible information on Mirchi Seth. Ajay comes over to Bahid to investigate and meets Gulfam who is temporarily staying in his ancestral manor near Bahid. The events unfold to reveal Gulfam to be the mastermind behind the intrusion of arms into India at the behest of Pakistan's Inter-Services Intelligence (ISI). Gulfam attempts to derail the investigation through political means and ordering an assault on Ajay to subvert the investigation, but of no avail. The repeated failures on Gulfam's part displease the senior officers in Pakistani Intelligence, who dispatch Major Aslam Beg (Sri Vallabh Vyas) to subtly convey the message to Gulfam ? Perform or Perish.
The investigative teams prepares for a final assault on the gun-running operation and in the pursuit of Mirchi Seth land up at Gulfam's mansion. Ajay feels betrayed when he learns of Gulfam's treachery, but is aware of lack of substantial evidence to indict Gulfam for his crimes. He goads and tricks Gulfam into killing Baig and arrests him for the offense. Gulfam, unable to stand the humiliation, commits suicide and the team returns triumphant to Mumbai to much accolades for busting the terrorist racket. At Mumbai Airport, the team (specifically Salim) is tipped off on the whereabouts of Veeran and they embark on another investigation.