In the early hours of Friday morning, the Turkish government pulled back from the brink. After making apocalyptic noises about a "final" confrontation with protesters who had occupied an Istanbul park, the prime minister suddenly offered talks. With five dead and 5,000 injured, Recep Tayyip Erdogan agreed to suspend plans to turn part of Gezi park into a shopping mall until a court challenge is heard, defusing an alarming situation which had prompted condemnation of his government's tactics in the European Parliament.
This is far from marking the end of Erdogan's problems, however. What began as a protest in defence of one of Istanbul's few green spaces became a focus for anger against a government which has become nakedly authoritarian. Journalists have been in the frontline, and, last year, more than a fifth of the world's imprisoned journalists were in Turkish jails. But when the German Chancellor, Angela Merkel, raised the jailing of journalists at a joint press conference earlier this year, Erdogan snapped that only a handful had been arrested. "They are not imprisoned for their journalistic work," he said, accusing them of plotting a coup, having illegal arms or working for terrorist groups.
The rhetoric is typical of a politician who habitually sneers at legitimate expressions of disagreement; his language is inflammatory, verging on paranoid. He has compared abortions with air strikes on civilians, describing them as "a sneaky plan to wipe the country off the world stage". He's even enraged by Caesarean sections. He says every woman should have at least three and preferably five children, plays down Turkey's huge domestic violence problem, and dismisses evidence of a 14-fold rise in "honour" killings between 2002 and 2009.
But cities such as Ankara and Istanbul have substantial populations of modern, educated men and women who are robust in defence of their rights. Millions believe that Erdogan imposes his religious views in a way that far exceeds his democratic mandate. They point to new laws banning the sale of alcohol within 100 yards of a mosque, a prohibition all the more effective because 17,000 new mosques have been built during Erdogan's premiership. They don't like his promise to "raise a religious youth", especially after an official from his AK party tweeted recently that atheists "should be annihilated".
In the modern world, there is a limit to how much of this stuff reasonable people will tolerate. In the past couple of weeks, Turkey's profoundly intolerant prime minister has discovered the limits of trying to govern without consent.