Jon Stewart has announced a 12-week hiatus from hosting Comedy Central’s "The Daily Show” to direct a feature-length film this summer.

Deadline reports that Stewart has written the film himself. Titled “Rosewater,” Stewart’s directorial debut is based on Maziar Baghari’s book, “Then They Came For Me: A Family’s Story of Love, Captivity and Survival.”

To focus on the film, Stewart will take a hiatus from “The Daily Show” in midsummer as he is replaced for eight weeks by longtime contributor John Oliver.

Bahari’s book, published in 2011, follows the Canadian-Iranian journalist’s attempt to document the 2009 Iranian presidential elections and the ensuing protests. While Bahari expected to be in Iran for only a week, he was jailed under suspicion of espionage and kept in prison for 118 days.

While Stewart is best known as a comedian, many may be surprised to find that “Rosewater” will be a much more serious film than his “Daily Show” fare. What drove Stewart into crafting such a deeply personal story? In part, it’s because Stewart himself plays a part in it.

According to the New York Times, when Bahari was jailed in Iran, his captors pointed to a 2009 appearance on “The Daily Show” as evidence that he was in fact a spy preparing to influence the Iranian election in some sinister way.

“You can imagine how upset we were,” Stewart told the New York Times, “and I struck up a friendship with him afterward.”

Though “Rosewater” plans to go in some dark directions, Stewart has assured critics that the film will also focus somewhat on Habari’s signature sense of humor.

“One of the things that appealed to me about the story is that it does have lighter moments,” Stewart told the Times. “One of the things that kept Maziar alive was his ability to keep his sense of humor – to remember about joy and laughter – and see the absurdity of his situation.”

Watch Bahari’s June 2011 appearance on “The Daily Show” below.