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 (Ali Suliman) of the Saudi State Police kills several of the terrorists. The FBI Legal Attach  in Saudi Arabia, Special Agent Fran Manner (Kyle Chandler), calls his US colleague, Special Agent Ronald Fleury (Jamie Foxx), to advise him about the attack. Manner is discussing the situation with DSS Regional Security Officer Special Agent Rex Bura when an ambulance full of explosives is detonated killing Manner, Bura 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 (Jennifer Garner), a forensic examiner, FBI analyst Adam Leavitt (Jason Bateman), an intelligence analyst, and Special Agent Grant Sykes (Chris Cooper), a bomb technician, go to Saudi Arabia. On arrival they are met by Colonel Faris al-Ghazi (Ashraf Barhom), the commander of the Saudi State Police Force providing security at the compound. The investigation is being run by General Al Abdulmalik (Mahmoud Said) of the Saudi Arabian National Guard (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 (Omar Berdouni) 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 (Ali Suliman) 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 SWAT 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 (Jeremy Piven) 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 by terrorists who flee 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 launches rocket-propelled grenades at them and a fierce firefight starts. FBI analyst 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 for 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, and al-Ghazi sees the grandfather and inspects his hand. 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 grandson 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 U.S., where they are commended by FBI Director James Grace (Richard Jenkins) 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 daughter what his grandfather whispered to her as he was dying. The granddaughter tells her mother, "Don't fear them, my child. We are going to kill them all," a similar line Fleury whispered to Mayes, implying that this is a never-ending, vicious cycle.
Output: Where does the blood trail in the apartment lead to?