Jon Stewart’s directing debut is not a comedy. In fact, it’s about as far from funny as he could get. The Daily Show host adapted Rosewater from the 2011 memoir of Iranian-born journalist Maziar Bahari, who was arrested, imprisoned, and tortured for 118 days following Iran’s highly contested 2009 presidential election. While it might seem like odd source material for a comedian, Stewart has a personal connection to the story: Bahari had appeared in a 2009 Daily Show segment with Jason Jones. Bahari’s interrogators later used that sketch against him as evidence that he was a Western collaborator. Stewart, 51, breaks down the backstory on his first film behind the camera.

When did you first meet Maziar Bahari?
It was after he got out [of prison] and came on the show. We became friendly and started having breakfast whenever he was in town. He told me he was writing this book. Unfortunately, in this line of work you read more than your fair share of I’ve-been-imprisoned-in-another-country-for-merely-reporting autobiographies. But this was incredible. Maziar is an incredibly warm, intelligent, and sort of sparkly fella who has an ability to maintain his sense of humor. He was able to stand back and observe his own situation and feel the absurdity of it, and that allowed him to not lose his mind.

I hear you asked J.J. Abrams and Ron Howard for their opinions of your screenplay.
Yes, I did. They were both awfully gracious. Basically, I would ask anybody who came on the show who is in the business, ”While you’re sitting here, would you mind…” [Laughs] I was that dick in a coffee shop with a script.

Why did you cast Gael García Bernal as Bahari?
Knowing Maziar made casting him more difficult. He’s got an elfin quality of mischief that Gael, when he read for the role, really captured. It’s difficult to retain a sense of that while in solitary confinement. I asked Maziar, ”How would you feel about Gael playing you?” [Imitates Bahari] ”I do not know if he’s handsome enough to play me.”

You filmed for five weeks in Jordan — I’m guessing it was different from The Daily Show.
It was a pretty seat-of-the-pants operation. Not to sound too Rumsfeldian, but I didn’t know what I didn’t know going in. I brought five crew members, and the rest was local. Pretty much everybody there did the film in their second language, and some in their third. Except for me. [Laughs]

How did the shoot go overall?
Did you ever work at a restaurant? Remember your first or second day, how simple s—like ”Where is the ketchup?” takes you five minutes where it takes someone else 10 seconds? Especially early on, there were a lot of people who didn’t know where we kept the ketchup.

That makes sense.
Well, I think you’ll find Spielberg making the Ketchup Analysis very often.

Last December, an Iranian TV show called you a CIA Zionist spy.
[Laughs] Apparently that is the case. Look, I don’t ever forget how fortunate I am. To be able to express displeasure or discomfort with the powers that be is a luxury not afforded to people in other countries. In some ways, this movie is a love letter to being able to express yourself.

Do you want to keep directing films?
It depends on who else I can get arrested.