In 2009, when Iran held a hotly contested Presidential election, Iranian-Canadian journalist Maziar Bahari participated in a skit on Jon Stewart’s immensely popular Daily Show, pretending to be a spy. Soon after, when conservative President Mahmoud Ahmadinejad was reelected with a shockingly high majority of votes, protests and rallies began to take place, which accused the government of fraud. The Green Revolution had started, which stirred the nation and the media internationally, but was eventually quelled by the Iranian authorities.

Bahari, who was in Iran covering the election, had stayed to see the demonstrations. Too long—as Jon Stewart’s directorial debut Rosewater makes clear. As the protests mounted, arrests were made and one of the people caught up in the police sweep was Bahari, who was accused of espionage. Whether the Iranian authorities were naïve enough to believe the Stewart skit or simply decided to arrest Bahari because he was a correspondent for Newsweek or because his family had been radicals, can only be left to conjecture.

What’s true is that he spent 118 days in prison until international pressure from Canada, the U.S. and England, where his pregnant wife was waiting for him, caused his release. Rosewater details Bahari’s time in jail, with occasional flashbacks to his family’s past—a Communist father and an older sister who protested repeatedly against the Ayatollah had hardly made him a popular figure among the authorities in Tehran.

In prison, an anonymous security agent whose only remarkable feature was the odour of rosewater, which he constantly splashed on his body, continually harassed and interrogated Bahari. The duel of wits between the two becomes the focal point of this prison drama, embellished somewhat by metaphorical visitations by his deceased father, who offers Bahari advice on how to deal with authorities when you’re behind bars.

Gael Garcial Bernal is excellent as Bahari and the rest of the cast acquit themselves well. Rosewater is a fine film that could have been extraordinary if Stewart’s direction was tauter and the script more pointed in its attack on Iran’s repressive political system.

I got to spend quite a bit of time with Bahari in 2007, when he was the subject of a small retrospective of his TV documentary work at IDFA, a major doc festival in Amsterdam. At that point, he was very optimistic about the future of his country. Clearly, he anticipated the Green Revolution. In statements made after his time in prison, Bahari’s remarks have been more guarded. Though he still has high hopes for his country, he knows now that the immediate future is not so bright.

Bahari remains an important presence in doc-journalism in London, where he’s presently living. The likely success of Rosewater, keyed to an awareness campaign surrounding Stewart and Bernal, will doubtlessly aid his career. And that’s a good thing.