CAIRO — He arrived with a prankster's aplomb.
Bassem Youssef, a popular Egyptian TV satirist often compared to Jon Stewart, appeared before a prosecutor Sunday on charges of defaming President Mohamed Morsi. The mercurial comedian milled around outside the courthouse wearing a barrel-sized hat that mocked a cap Morsi donned recently when accepting an honorary doctorate in Pakistan.
Youssef tweeted and grinned, turning the state arrayed against him into an unwitting straight man in the latest act of political theater between Morsi and a growing opposition that includes artists, activists, comedians and bloggers.
"Police officers and lawyers at the prosecutor-general's office want to be photographed with me, maybe this is why they ordered my arrest?" Youssef posted on Twitter during his questioning.
The doctor-turned-entertainer is accused of insulting the president and defiling Islam in skits that draw comparison to Stewart's "The Daily Show." With sharp wit and withering satire, Youssef has emerged as a cause celebre in a battle to expand freedom of expression against an authoritarian Islamist-run government that has shown little sense of humor.
At least 28 complaints were filed against Youssef under an old law used by toppled leader Hosni Mubarak to prevent ridiculing of the government. A human rights lawyer told Egyptian media that more of these complaints were brought in the first few months of Morsi's rule than in all of Mubarak's 30-year reign.
Youssef has portrayed Morsi as a pharaoh prone to verbal gaffes, such as when the president spoke out against drunken driving by saying, "Gas and alcohol don't mix." After Morsi granted himself sweeping powers in November, Youssef dubbed him "Super Morsi" and "Morsi, the unifier of authorities," a play on the president's inability to unify Egyptians.
Morsi and his Muslim Brotherhood, which controls the new government, are sensitive about their increasingly damaged reputations amid violent street protests, political divisions and an imperiled economy. Writers and editors have been pressured by the Islamist political elite, and last week the prosecutor general issued arrest warrants for five leading anti-Islamist activists.
Complaints against Youssef also include threatening the public order and denigrating Islam. The satirist has been the target of frequent lawsuits by Islamist lawyers in what human rights activists describe as part of a wider campaign to intimidate opponents of the Muslim Brotherhood before this year's parliamentary elections.
"We are not the ones who insult religion," Youssef told a TV station Saturday. "All we do is expose the channels that have misused religion and harmed it more than anyone else. If there is anyone who has insulted religion, it is those who use Islam as a weapon for political reasons."
He said the Islamists in power "have disfigured my religion."
While dozens of supporters waited outside the courthouse Sunday, Youssef, who since the uprising that toppled Mubarak in 2011 has become the irreverent conscience of the nation for many, updated his fans with tweets about his five-hour interrogation:
"Nobody even brought us a glass of water. Questioning will start now."
"Now they are looking for a laptop with a … program to play the [offending] episodes but they can't find one."
Youssef was released on the equivalent of about $2,200 bail and remains under investigation.
Special correspondent Ingy Hassieb contributed to this report