The assault was as brutal as it was predictable. On Friday and Saturday Erdoğan had hosted a European Union meeting in Istanbul. Rumour had it that Turkey's prime minister would send in riot police to clear the demonstrators from Taksim Square – which they had peacefully occupied for 12 days — once his European guests had flown home.

And so it proved, with police encircling the square at 6am on Tuesday, firing rubber bullets and teargas, and ripping down banners calling for Erdoğan's resignation. By happy coincidence, Turkey's state media, which for days had blithely ignored the country's huge anti-government demonstrations, were on hand to record the event.

Turkish TV viewers witnessed this: a small group of four or five "demonstrators" throwing molotov cocktails at police. At one point they advanced on police lines in a comic Roman-style phalanx while holding the flag of a fringe Marxist party. The "protesters" were in fact middle-aged undercover police officers, staging a not very plausible "attack" on their own for the benefit of the cameras.

But the violence meted out against the genuine protesters camped out under the plane trees of nearby Gezi Park was real enough. Dozens were left choking or injured as teargas billowed across central Istanbul. Meanwhile, some 50 lawyers acting for detained activists were themselves dragged away by police and roughed up at Istanbul's Çağlayan court.

Faced with a choice between engaging with this new, vibrant civil society movement or crushing it, Erdoğan has picked the latter course. Indeed, his reaction to the nationwide citizens' revolt reveals ominous parallels with another autocratic leader who has recently found himself in a tight spot: Vladimir Putin.

None of this bodes well for Turkey's already tortuous EU accession prospects, for relations between secular and religious Turks, or for the country's democratic future.

Erdoğan's polarising tactics might have come straight from the Putin playbook. Instead of talking to the demonstrators – a diverse and previously non-political bunch – he has blamed the protests on a murky foreign conspiracy. Many critical journalists are already in jail and on Tuesday Erdoğan denounced the international media. His ruling Islamist-rooted Justice and Development party (AKP) has made menacing noises about banning Twitter, one of the main conduits for anti-Erdoğan mockery, and dubbed a menace by the PM.

Like Putin, Erdoğan has been in power for more than a decade. Unlike Putin, he won a mandate through fair elections. He remains Turkey's most popular politician.

Since winning a third parliamentary victory in 2011 Erdoğan has embarked on a controversial project of Islamist social retooling. He has banned the sale of alcohol from 10pm to 6am, and banished booze from the vicinity of shops and mosques. The protesters are unhappy about this and other affronts to their lifestyles, and increasingly authoritarian governing style.

As gas wafted across Taksim Square on Tuesday, Erdoğan said that Turkey's protest movement was over. Once again, he is wrong. The country's civil society movement – driven overwhelmingly by students, young people, and the creative elite but including many other groups – cannot now be suppressed. However many teargas volleys the riot police shoot, Turkey is entering a new period of contestation. Erdoğan has grown used to having things his own way. But now he will have to seek compromise.

Since the crisis began, the worst of his leadership, Erdoğan has lashed out at numerous enemies, most of them fictive. Actually, Erdoğan only has himself to blame for the damage done to Turkey's international image. Hubristic, peevish, and not a little paranoid, only he has the power to reverse this.