STXfilms has bought U.S. rights Kevin Macdonald’s untitled legal thriller, starring Jodie Foster, Shailene Woodley, Tahar Rahim and Benedict Cumberbatch.

The film, which was formerly known as “Prisoner 760.” is based on Mohamedou Ould Slahi’s memoir “Guantánamo Diary,” centers on Slahi (Rahim), who languishes in prison for years without charge or trial until he finds allies in defense attorney Nancy Hollander (Foster) and her associate Teri Duncan (Woodley). Their advocacy, along with evidence uncovered by military prosecutor, Lt. Stuart Couch (Cumberbatch), reveals a shocking and far reaching conspiracy.

STXinternational also acquired the international rights to the film last fall at the American Film Market and will distribute the movie in the U.K. and Ireland.

Macdonald directs from a screenplay by Michael Bronner and Rory Haines and Sohrab Noshirvani.

Production on the film wrapped earlier this year in South Africa. Cumberbatch is producing with Adam Ackland and Leah Clarke for their company SunnyMarch, alongside Lloyd Levin and Beatriz Levin for Shadowplay Features, Mark Holder and Christine Holder through their newly formed venture Wonder Street, and Branwen Prestwood-Smith. Michael Bronner also serves as producer.

Financiers are 30West and Topic Studios in partnership with BBC Films, which also developed the project. Executive producers are 30West principals Micah Green, Dan Steinman and Dan Friedkin, Topic Studios’ Maria Zuckerman, Ryan Heller and Michael Bloom, and BBC Films’ Rose Garnett. Jim Reeve and Robert Halmi are executive producing for Great Point Media, and Zak Kilberg and Russell Smith are executive producing for Convergent Media. Larry Siems and Mohamedou Ould Slahi serve as co-producers.

Woodley also has “Last Letters from Your Lover” in post-production, while Foster most recently appeared in “Hotel Artemis” in 2018.