The Daily Show host Jon Stewart has a tip for leaders of totalitarian regimes: “Don’t arrest journalists, because they have a mind for detail.” It’s certainly true for Maziar Bahari, whose best-selling memoir, Then They Came for Me—a painstaking account of his 118 days of imprisonment and torture following the 2009 Iranian election—is the basis of Stewart’s directorial debut, Rosewater ( out Nov. 7 in limited release ).

In an absurdist twist, the journalist’s appearance in a Daily Show sketch was even used as evidence of Bahari being a spy. Stewart, who became close friends with Bahari after his ordeal (“I like to get people arrested before I get to know them,” he jokes), was so impressed by the book and its author that he undertook writing and directing duties on the film himself. “It may not be what people expect from me; it’s not a comedy,” the host says of the film, which stars Gael García Bernal as Bahari and Shohreh Aghdashloo as his mother. “I hope people view it for what it is—a love letter to expression and the importance of it. It’s everything.”