Based on the true story of Khalid El-Masri, a German citizen who was mistaken for Khalid al-Masri, rumored to have been involved with the September 11th, 2001 terrorist attacks. In 2004, El-Masri was arrested and transferred to a "black" site in Afghanistan where he was interrogated, beaten, sexually abused, and tortured for 5 months before the CIA released him, admitting that his capture and torture were a mistake.
The quote, "I fear you speak upon the rack where men enforced do speak anything" (a man undergoing torture will say anything to make the pain stop) is from Act 3 Scene 2 of The Merchant of Venice by William Shakespeare.
The trivia item below may give away important plot points.
The movie never confirms whether the renditioned individual is an innocent/wrongly accused or a terrorist/correctly discovered as one. One theory the filmmakers suggested is that he was not a terrorist but was set up by a terrorist cell who put his information on a cell phone that they knew would be discovered by the CIA and lead them to the wrong guy while they got away scott-free.