Among barbs aimed at Egypt's ruling Islamists and others, Stewart praised host Bassem Youssef for taking risks to poke fun. "If your regime is not strong enough to handle a joke," he said, "then you don't have a regime."
Youssef is a cardiologist whose online comedy clips inspired by Stewart's "Daily Show" won him wild popularity and a prime-time TV show after the 2011 revolution that ended military rule. He paid tribute to his guest as a personal inspiration as the pair traded gags over Stewart's impressions of a visit to Cairo.
Stewart in turn played down any difficulties his wit created for him in the United States, telling Youssef: "I tell you this, it doesn't get me into the kind of trouble it gets you into. I get in trouble, but nowhere near what happens to you."
With Egypt still in ferment and elected Islamist President Mohamed Mursi facing off against liberals who fear he plans to smother personal freedoms, Youssef was released on bail after being questioned in March over alleged insults to Mursi and the channel he appears on was threatened with losing its license.
Criticising such moves, which have also drawn reproaches for Egypt from the U.S. government, Stewart said: "A joke has never shot tear gas at a group of people in a park. It's just talk.
"What Bassem is doing ... is showing that satire can still be relevant, that it can carve out space in a country for people to express themselves. Because that's all democracy is."
He took aim at Mursi's controversial decision this week to name a member of a hardline Islamist movement blamed for a massacre of tourists at Luxor in the 1990s as governor of that city. Having been brought into the studio hooded and presented as a "spy," he spoke a few words in Arabic before saying Egypt's president had honoured him: "I am now the mayor of Luxor."
Stewart also appeared to take a gentle dig at the opposition, who hope demonstrations planned for June 30 can force Mursi from power after just a year in office. It took Americans 100 years before a president was impeached for the first time, Stewart said: "For you guys to do it in one year, it's very impressive."
Perhaps the biggest laugh in the studio, though, was for a simple crack at Egypt's perennial traffic chaos: "I know this is an ancient civilisation," he said. "Have you thought about traffic lights?"