The test of your democratic values, if you live in the Middle East today, comes when a majority of your fellow citizens elect a party whose ambitions are opposed to those very values. Do you support an effort to cut the party off at the root, defying the election result? Or do you let the party's ideas wither on the vine under the heat of political reality, and wait for the inevitable democratic defeat?
This week, we witnessed a historic illustration of these contrasting approaches. Two national leaders, both elected Islamists who ruled increasingly recklessly, each suffered major setbacks.
The less subtle one happened to Mohamed Morsi of Egypt's Muslim Brotherhood: On Tuesday, a Cairo court upheld his sentence to death by hanging.
Mr. Morsi is the only person ever to become president of Egypt in a free and fairly contested election. He won power in June, 2012, by a slim majority against a disorganized secular opposition. His rule was chaotic, ham-fisted and demagogic: He locked up journalists and cracked down violently on protests, tried to impose harsh religious laws, and bypassed democratic checks and balances in a paranoid attempt to consolidate power.
By 2013, it was apparent that Mr. Morsi's government was a disaster, betraying the principles of the 2011 democratic revolution that brought him to power. It was also apparent that the majority of the Egyptian electorate was appalled by his rule.
But that failure was not allowed to manifest itself, and the wider Mideast did not get to witness an Islamist government losing an election and fading into obscurity: On July 3, 2013, he was overthrown in a military coup led by General Abdel Fatteh el-Sisi, who remains president today and whose regime has killed at least 2,500 Muslim Brotherhood members and imprisoned 16,000.
The rest have mainly fled the country – and become more potent and extreme. As New York University Mideast analyst Mohamat Bazzi recently concluded, executing Mr. Morsi "would make him a martyr in Egypt and beyond" and send the message that "the only way to achieve political power is through violence."
When leaders with bad ideas are popularly elected, overthrowing or killing them has two effects. First, the thing that replaces them is almost bound to be even worse. And second, instead of fading into ignominious obscurity after an election loss, they become the subjects of heroic mythology.
That happened throughout the last century. Elected leaders with lousy economic ideas, such as Mohammad Mosaddeq in Iran, Salvador Allende in Chile or João Goulart in Brazil, all of whom would have been forgotten soon after their one-term electoral demise, were overthrown in military-backed (and U.S.-backed) coups; their imposed, non-democratic successors were terrible tyrants who badly damaged their countries.
But there is another approach. Islamists can burn out, but they can also fade away.
The second Islamist leader to suffer a setback this week was President Recep Tayyip Erdogan of Turkey. His was less violent, but more historically significant: After 60 per cent of Turks voted for anyone but Mr. Erdogan's party in last week's elections, he emerged from four days of silence this week to declare that his Justice and Development Party would need to govern in a compromise with other parties which oppose his agenda, and, by implication, would abandon his plan to rewrite the constitution to become an all-powerful executive.
This was quite a denouement for a man who has recently portrayed himself as a revival of the Ottoman Sultanate. While he started in 2002 as a European-minded reformist moderate, first as Prime Minister and then as President, in recent years he has imprisoned scores of journalists, cracked down violently on protests and changed the constitution to give himself great power. Historically, that would be occasion for a military coup in Turkey.
But the military and Mr. Erdogan's opponents allowed his narrative to play out. And this changed the views of Turks: They came overwhelmingly to prefer democracy over strongman leadership, Europe over the Mideast, and secularism over Islam. Polls show that support for sharia law is only 12 per cent, the lowest in any Muslim country; Mr. Erdogan's support fell by 24 per cent and support for religious leaders fell by 27 per cent. The Islamist experience turned Turks against the Islamist experience, and encouraged more robust democracy. Mr. Erdogan will either change to embrace these views, or suffer even greater electoral losses. This is how the world of religious politics should end: Not with an autocratic bang but with a democratic whimper.