“HOW CAN a government that received almost 50 percent of the vote be authoritarian?” asked an adviser to Turkish Prime Minister Recep Tayyip Erdogan on Friday, even as police attacked crowds of peaceful protesters. The question goes to the heart of what is wrong with Mr. Erdogan’s ruling style, and the answer can be found not only in the policies pursued by the ruling Justice and Development Party (AKP) during the past dozen years but also in the way it has responded to protests by hundreds of thousands of exasperated citizens.

Turkey is an electoral democracy, and the AKP has won three consecutive elections by increasing margins. But the past week’s events have underlined that the country no longer has the robust free press found in Western nations. As protesters poured into Istanbul’s Taksim Square, the country’s television media looked away: CNN Turkey broadcast a cooking program. Even print journalists pulled their punches, and with good reason: According to the Committee to Protect Journalists, Turkey has imprisoned at least 49 journalists because of their work, more than any other country.

In a democracy, peaceful dissent not only is accepted but also often compels changes in government policy. Turkey’s protesters began with a local but legitimate grievance, a government decision to eliminate a park adjacent to Taksim Square. Rather than tolerate them, the government dispatched riot police, which in turn caused the demonstrations to spread and to raise broader issues. Turkey’s secular and religious minorities have much to lament, from the recent imposition of tight controls on alcohol sales to Mr. Erdogan’s support for Sunni rebels in Syria.

Unlike President Abdullah Gul, who defended dissenters’ right to protest, Mr. Erdogan angrily claimed they had been “organized by extremists” and were sponsored by foreigners. He vowed to press ahead with the destruction of the park in spite of a court ruling against it. It was the reaction that might be expected from a strongman such as Russia’s Vladi­mir Putin — from whom Mr. Erdogan appears to be taking some cues. A new constitution for which he is pressing would give substantial new powers to the office of president, opening the way for the Turkish leader, like Mr. Putin, to remain in office for another decade after his term as prime minister expires.

As Mr. Erdogan sees it, the fact that a majority of Turkish voters supports him entitles him to push through his agenda in spite of legal niceties and to tear-gas, imprison or otherwise intimidate those who object. Disturbingly, this “majoritarian” view of politics also has been embraced by the democratically elected Islamist government of Egypt. The result in both countries has been a dangerous polarization between religious and secular forces that threatens to destabilize longtime U.S. allies.

The Obama administration, which has cultivated a relationship with Mr. Erdogan, has responded to the protests by expressing concern about “the excessive use of force” and supporting the right of free assembly. It should say more. For Turkey’s allies, the crisis offers an opportunity to tell Mr. Erdogan that democracy consists of more than elections — and that he is offering unfortunate proof that it is possible to be both elected and authoritarian.