Based on the true story of Khaled El-Masri, a German citizen who was mistaken for Khalid al-Masri, rumored to have been involved with the September 11, 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 five months before the C.I.A. 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 screenplay for this film was featured in the 2006 Blacklist; a list of the "most liked" unmade scripts of the year.
The original opening shot was Rio de Janeiro in the screenplay but director Gavin Hood decided to change it to Cape Town's Table Mountain in his native South Africa.