Open Road Films has acquired U.S. distribution to Jon Stewart’s “Rosewater,” his directorial and screenwriting debut.

The deal was announced two days before the opening of the Cannes Film Festival, where Sierra/Affinity is handling international sales.

Stewart directed the film, starring Gael Garcia Bernal, last summer while he was taking a three-month summer break from “The Daily Show.”

“Rosewater” is an adaptation of BBC journalist Maziar Bahari’s book “Then They Came for Me: A Family’s Story of Love, Captivity and Survival,” which the Canadian-Iranian co-wrote with Aimee Molloy. The story recaps Bahari’s four months in an Iranian prison being blindly interrogated by a man who smelled of rosewater.

Stewart, OddLot Entertainment founder Gigi Pritzker and Scott Rudin produced and OddLot financed the project. Sierra/Affinity acts as the exclusive sales agent for films developed and produced by OddLot.

Stewart’s involvement with Bahari’s story began in 2009, when interrogators cited a “Daily Show” interview that Bahari participated in as evidence of his connection to Western spies. Stewart and “The Daily Show” covered Bahari’s story and had journalist appear on the show once he was released from prison.

The deal was negotiated by UTA on behalf of the filmmakers and on behalf of Open Road Films by Tom Ortenberg, Elliott Kleinberg and Peter Lawson.