CIA analyst Douglas Freeman (Jake Gyllenhaal) is briefing his chief in a square in North Africa when a suicide attack kills his boss and 18 other people. The target was interrogator and torturer Abasi, but he is unharmed.
Egyptian-born Anwar El-Ibrahimi (Omar Metwally), a chemical engineer who lives in Chicago with his pregnant wife Isabella (Reese Witherspoon) and their young son, is linked to a violent organization by telephone records indicating known terrorist Rashid placed several calls to Anwar's cell phone. While returning to the US from a conference in South Africa, he is detained by American officials and sent to a secret detention facility near the location of the suicide attack depicted earlier. Isabella is not informed and, growing worried, travels to Washington and slowly pieces together details of Anwar's detention.
For lack of more experienced staff, Freeman is assigned the task of observing the interrogation of Anwar by Abasi Fawal (Yigal Naor). After Freeman briefly questions and tortures Anwar himself, he is convinced of Anwar's innocence. However, his boss insists that the detention continues, justifying such treatments as necessary to save thousands from becoming victims of terrorism. Eventually Anwar confesses to have advised on how to make more powerful bombs, and to have been promised $40,000 in return. However, Freeman believes it is a false confession, which is confirmed when he Googles the names Anwar gives and finds out that they are the names of the Egyptian football team from the year Anwar left Egypt. He also expresses doubt as to whether Anwar would be willing to put his life, family and job in danger for $40,000 when he earns $200,000 in his job. He quotes Shakespeare in a discussion on the value of intelligence gathered through torture:
I fear you speak upon the rack, Where men enforced do speak anything. Without the consent of his superiors, Freeman orders Anwar's release and lets him escape through a clandestine trip by ship to Spain. Anwar returns to the US and is reunited with his family. Freeman then leaks the details of Anwar's detention to the American press. The story is then found in the newspapers the following day by Corrine Whitman, who ordered Anwar's extraordinary rendition.
Another story line is shown in parallel, but at the end of the film it turns out that all this happened before the suicide attack: Abasi's daughter Fatima (Zineb Oukach), has run away from home with her boyfriend Khalid (Moa Khouas), whose brother died in Abasi's prison. Unknown to Fatima, Khalid is a terrorist. He is the one who carries out the suicide attack with Abasi as the target. But Fatima finds out from the photos that Khalid's brother met his death at the hands of her father, and realizes what Khalid is planning. At the town square Fatima begs him not to do it, arguing that the target is her father. After removing the pin of his detonator he hesitates, and is therefore killed by the organizers of the attack. As a result he releases the handle of the detonator, and the bomb explodes, killing Fatima also.
The record of a phone call supposedly made by Rashid to Anwar is not explained in the film. However, earlier it was mentioned that phones are sometimes passed on from one person to another, yet despite this reasonable doubt the CIA officials refused to release him. It turned out that in South Africa, while Anwar's phone was off, there had been a call to it from an unknown person.
For the scenes of Abasi's private life it is not always clear to which storyline they belong, that before or after the explosion. Abasi learns about Fatima's death only a week later.