Traitor
(2008)

Samir Horn (Don Cheadle) is actually a double agent, being handled by Carter (Jeff Daniels). He befriends a terrorist named Omar (Saïd Taghmaoui), to get close to a mysterious head terrorist named Nathir. At the same time, FBI agents Roy Clayton (Guy Pearce) and Max Archer (Neal Macdonough) are hot on his trail, unaware that he's on their side.

Finally meeting Nathir, Samir finds out that the main mission is to put suicide-bombers in buses in the US. Samir will be the point man for this mission.

The Feds find a lot of evidence against Samir in their investigations, and soon, he's on the FBI's Most Wanted list.

When Carter tries to get Samir out, he gets killed by Omar, while Samir watches helplessly.

Finally, they flee to Halifax, Nova Scotia, to a ship. Samir gets his hands on a gun and kills Fareed (another terrorist) and Nathir. Omar and he have a standoff. He tries to talk some sense into Omar. Omar is adamant and says that the suicide-bombers are already on their way. However, Samir had put them all on the same bus. Only the bus full of suicide-bombers blows up. A SWAT team bursts inside and kills Omar and wounds Samir. However, Clayton and Archer come to Samir's rescue (he had leaked info to them, when Carter was killed).

Samir is released from hospital. Clayton meets him and tells him that his record has been wiped clean, though it is of no relevance to Samir. He still feels guilty for the innocents who died because of him. Clayton consoles him, saying that he saved many more.

The movie ends with Samir performing namaz.

Thanks Rahul!