Anyone who sincerely wishes to bring stability and economic prosperity to the Middle East has to address the problem of angry young men.
Decades of dictatorship, corruption and under-employment have created reservoirs of males who have a strong sense of grievance and nothing much to do. In some countries, where unpleasant regimes have recently been overthrown, they have guns. They're a threat to civil society, they make the streets unsafe for women, and they don't need much encouragement to turn into a baying mob.
It happened again last week when an obscure American film about the Prophet Muhammad led to days of violent protests. It wasn't clear whether the movie was the cause of an attack on the American consulate in Benghazi, where the American ambassador to Libya and three of his staff were murdered, or the pretext for an assault orchestrated by extremists sympathetic to al-Qa'ida. But rioters in several countries refused to acknowledge any distinction between the US government, which had nothing to do with the film, and the weird bunch of Coptic and evangelical Christians who did. In northern Lebanon, protesters even appeared to blame a branch of KFC.
Two days ago, the attacks spread beyond the Middle East and to European diplomatic missions, including the British and German embassies in Khartoum, Sudan. In this volatile situation, it is vital for political leaders to do everything they can to calm the situation. But Egypt's Freedom and Justice party, the political wing of the Muslim Brotherhood, called for protesters to come on to the streets after Friday prayers. It didn't change its mind until the last minute while the president, Mohamed Morsi, complained about the film before condemning the attacks.
Turkey's Islamist administration behaved more responsibly. But this is primarily a test of the new governments which have taken over from dictatorships following the Arab spring. And I'm afraid it demonstrates the reluctance of some Islamist parties to abandon the mob as an instrument of power. Gender is at the heart of this reluctance, which is accompanied by the continuing exclusion of women from power and public space.
In Egypt, sexual harassment is rife on the streets; in Tunisia, the ruling Islamist party has written a clause into the draft constitution suggesting that women are "complementary" to men.
It's an attachment to a kind of machismo which is lethal and comical at the same time. In her new book Superman is an Arab, the Lebanese author Joumana Haddad compares the dominant mode of masculinity in the Middle East to a comic-book superhero: "He may claim to be saving the world, but the world actually needs to be saved from him; and first and foremost, he needs to be saved from himself." She's right: young men in the Middle East have too much religion, but not enough jobs and self-esteem.