TURKEY used to be regarded as a beacon of stability and proof that Islam and democracy could co-exist, even amidst the complex and turbulent politics of the Middle East.

It certainly did not look like that yesterday as riot police descended on Istanbul's Taksim Square, spraying protesters with water cannon, tear gas and rubber bullets.

It is a measure of the hubris of the country's Prime Minister Recep Tayyip Erdogan that what began as a peaceful protest against the felling of trees to make way for a shopping centre, ended by drawing parallels with Tahrir Square in Cairo and Tiananmen Square in Beijing.

Of course, there are big differences. Mr Erdogan has not only tripled GDP per person and overseen the construction of hundreds of roads, schools and hospitals since 2001 but, by western measures, he is an extremely popular politician. Close to 50% of the electorate returned him for a third term in 2011, a result David Cameron would have given his eye teeth for.

However, if half the population voted for him, the other half did not. Rather than listen to his detractors, he has brutally suppressed them. It is claimed that there are more journalists behind bars in Turkey than any other country, including China. Complaints that the police have been heavy-handed in their response to recent protests are supported by the Reuters image of academic Ceyda Sungur in an elegant red dress being drenched with tear gas by masked riot police. It was a brief throwback to the cruelty of the repression meted out by the army and police in the 1980 military coup, when nearly 200,000 people were arrested and torture was routine. This time, however, crude censorship is ineffectual. Thanks to social media, the images of Ms Sungur and the scenes in Taksim Square yesterday have gone around the world, giving the lie to Mr Erdogan's assertion that the protesters are "louts" attempting to destroy Turkey.

Instead, it is his own political miscalculations that threaten his country's future. This protest was never simply about a few sycamore trees. There are strong undercurrents of resentment about the speed with which the Turkish government sided with the rebels in Syria, expecting Bashir al-Assad's regime to crumble quickly and now finds itself embroiled in an enervating conflict.

There is anger too at recent legislation restricting the sale of alcohol and introducing Koran lessons in primary school, moves seen as Islamicising an emphatically secular state.

Meanwhile economic growth is faltering, negotiations to join the EU are on hold and attempts to end the 30-year civil war with the Kurds in the south-east have ground to a halt. The foreign investment and overseas tourism that the country relies on are jeopardised by what looks like a return to the bad old days.

This issue is less about secularism versus Islamicisation than pluralism versus authoritarianism backed by state thuggery. Perhaps a better heir to the mantle of Kemal Ataturk, founder of modern Turkey, is President Abdullah Gul, who last week declared that in a democracy every citizen's views deserve respect.