During a softball game at an American oil company housing compound in Riyadh, Saudi Arabia, al-Qaeda terrorists set off a bomb, killing Americans and Saudis. While one team hijacks a car and shoots residents, a suicide bomber wearing a fake police uniform blows himself up, killing everyone near him. Sergeant Haytham of the Saudi State Police kills the carjackers. The FBI Legal Attaché in Saudi Arabia, Special Agent Fran Manner, calls his US colleague, Special Agent Ronald Fleury, to advise him about the attack. Manner is discussing the situation with DSS Special Agent Rex Burr when an ambulance full of explosives is detonated, killing Manner, Burr, and many others.
At FBI Headquarters in Washington, D.C., Fleury briefs his rapid deployment team on the attack. Although the U.S. Justice Department and the U.S. State Department hinder FBI efforts to investigate the attack, Fleury blackmails the Saudi ambassador into allowing an FBI investigative team into Saudi Arabia. Fleury gathers Special Agent Janet Mayes, a forensic examiner, FBI analyst Adam Leavitt, an intelligence analyst, and Special Agent Grant Sykes, a bomb technician, to go to Saudi Arabia. On arrival they are met by Colonel Faris al-Ghazi, the commander of the Saudi State Police Force providing security at the compound. The investigation is being run by General Al Abdulmalik of the SANG, who does not give Fleury and his team permission to investigate.
The FBI team is invited to the palace of Saudi Prince Ahmed bin Khaled for a dinner. While at the palace, Fleury persuades the Prince that Colonel al-Ghazi is a natural detective and should be allowed to lead the investigation. With this change in leadership, the Americans are allowed hands-on access to the crime scene. While searching for evidence, Sergeant Haytham and Sykes discover the second bomb was detonated in an ambulance. Fleury learns the brother of one of the dead terrorists had access to ambulances and police uniforms. Colonel al-Ghazi orders a special forces team to raid a house, managing to kill a few heavily armed terrorists. Following the raid, the team discovers clues, including photos of the U.S. and other Western embassies in Riyadh. Soon afterward, the U.S. Embassy Deputy Chief of Mission Damon Schmidt notifies Fleury and his team that they have been ordered to return to the United States.
On their way to King Khalid International Airport, their convoy is attacked and incapacitated. Leavitt is dragged out of the wrecked car and kidnapped while Fleury manages to wound one attacker. Al-Ghazi commandeers a civilian vehicle to chase the fourth SUV and the other car holding Leavitt into the dangerous Al-Suwaidi neighborhood of Riyadh. As they pull up, a gunman fires rocket-propelled grenades at them and a fierce firefight starts. Leavitt is tied up inside a complex.
While Sykes and Haytham watch the entrance to the complex, al-Ghazi, Fleury, and Mayes follow a blood trail and kill many gunmen inside. Mayes, separated from the others, finds Leavitt and his attackers, preparing an execution video of Leavitt. She kills the remaining insurgents, and al-Ghazi and the team start to leave. Fleury then realizes there is a trail of blood leading to the back of the apartment. After they enter, Mayes comforts a girl in the apartment and offers her candy. In return, the girl offers Mayes a marble, similar to those embedded in the bodies of some bombing victims. Al-Ghazi sees the grandfather, reaches out with his hand, and offers to help him stand. When the old man gives him his hand, al-Ghazi sees that the man is missing the same fingers as Abu Hamza al-Masri in the terrorist group's many videos and confirms his suspicion that the grandfather is the terrorist leader. Abu Hamza's teenage grandson walks out of the bedroom and shoots al-Ghazi in the neck, then he starts to point his gun at Mayes, prompting Fleury to kill him. Abu Hamza then pulls out an assault rifle and Haytham kills him. As Abu Hamza dies, another grandchild hugs him and Abu Hamza whispers something into his ear to calm the child down. Al-Ghazi dies in Fleury's arms.
At al-Ghazi's house, Fleury and Haytham meet his family. Fleury tells his son that al-Ghazi was his good friend, mirroring a similar scene earlier in the movie wherein he comforted Special Agent Manner's son. Fleury and his team return to the United States, where they are commended by FBI Director James Grace for their outstanding work. Leavitt asked Fleury and Mayes what he had whispered to her to calm her down. The scene cuts to Abu Hamza's daughter asking her own son what his grandfather whispered to him as he was dying. The grandson tells his mother, "Don't fear them, my child. We are going to kill them all," a similar line to what Fleury had whispered to Mayes.
Jamie Foxx as Special Agent Ronald Fleury
Chris Cooper as Special Agent Grant Sykes
Jennifer Garner as Special Agent Janet Mayes
Jason Bateman as Special Agent Adam Leavitt
Ashraf Barhom as Colonel Faris Al-Ghazi, Saudi State Police
Ali Suliman as Sergeant Haytham, Saudi State Police
Jeremy Piven as Damon Schmidt
Richard Jenkins as FBI Director Robert Grace
Tim McGraw as Aaron Jackson
Kyle Chandler as Special Agent Francis Manner
Frances Fisher as Elaine Flowers
Danny Huston as US Attorney General Gideon Young
Kelly AuCoin as Ellis Leach
Anna Deavere Smith as Maricella Canavesio
Minka Kelly as Miss Ross
Amy Hunter as Lyla Fleury
T.J. Burnett as Kevin Fleury
Ashley Scott as Janine Ripon
Omar Berdouni as Saudi Prince
Mahmoud Said as Brigadier General Al Abdulmalik
Tom Bresnahan as Special Agent Rex Burr
Hezi Saddik as Abu Hamza
Raad Rawi as Prince Thamer
Trevor St. John as Earl Ripon