Have you heard — and seen — the gag about the Egyptian president whose recent cap-and-gown outfit featured comically large headwear? It’s a riot.

Not nearly as funny: The absurdly harsh reaction of the Egyptian “justice” system to that and other jokes.

That nation’s chief prosecutor ordered Saturday’s arrest of Bassem Youssef, a heart surgeon who also has a popular weekly faux-news television show (seriously, folks). The charges: Insulting the president, ridiculing Islam and reporting false news.

The evidence supposedly supporting the case against Dr. Youssef includes his satiric gibes at Egyptian President Mohammed Morsi’s rampant tardiness, habitual finger waving and continuing allegiance to the Muslim Brotherhood. Dr. Youssef even wore an oversized grad cap — again — during a Sunday court appearance after being released on bail.

Yet the threat of a prison term for making light of a ruler as heavy-handed as Mr. Morsi is no laughing matter.

Nor is the general crackdown on dissent that his government has launched, including a series of arrest warrants issued last week against prominent political opponents.

However, the joke is on President Morsi if he imagines that he can bully Dr. Youssef into silence without widespread global notice.

Dr. Youssef is a fan of, and twice has been a guest on, Jon Stewart’s “Daily Show” on Comedy Central.

And on that show Monday night, Mr. Stewart got some laughs of his own at the expense of not just Mr. Morsi but the Obama administration’s decision to maintain high levels of military arms aid to his regime.

Mr. Stewart delivered this challenge to the Egyptian president:

“So Bassem Youssef pokes fun at your hat and your lack of promised democratic reforms. What are you worried about? You’re the president of Egypt, you have an army. He has puns and a show, you have tanks and planes. We should know — we still have the receipts.”

We Americans also still have a First Amendment right to poke fun at our elected officials.

And some of those clowns make unflattering wardrobe choices, too.