It’s by now axiomatic that democratic, prosperous, NATO member Turkey offers a valuable model for more troubled countries in the Middle East to follow. That remains broadly true, but Turkey itself appears to be losing its way.

This isn’t because the country’s neo-Islamist government is turning the country into an Iranian-style theocratic state. After two terms in office, it hasn’t. The problem, different but worrying, is that the improved democracy Turkey’s ruling Justice and Development Party so impressively began a decade ago is in retreat.

The latest sign came just last week. The government was shocked to find that prosecutors, whom it previously armed with special powers to root out terrorists, were now trying to arrest the government’s handpicked intelligence chiefs. The crime was doing their job: namely, talking to members of the Kurdistan Workers’ Party, a listed terrorist organization better known as the PKK.

Prime Minister Recep Tayyip Erdogan’s response was both distressing and revealing. He pushed through legislation that requires prosecutors to first obtain his permission before they can investigate officials acting under his orders. That gave him the power to exempt a chosen few from deeply flawed laws that apply to the rest of the nation.

Power Struggle

Erdogan said he was merely ensuring that “the elected will never be slaves to the appointed.” Doubtless he was sincere. But his decision will do nothing for the rule of law, nor for the democracy he said he was trying to protect.

Erdogan should instead redraft Turkey’s anti-terrorism laws to end abuses not just against his proteges, but also against thousands of others, including his opponents. Sadly, Turkey’s special prosecutors have been running amok for several years already. That’s why a report by the Council of Europe’s human rights commissioner, published in January, urged Turkey to “review the need for assize courts with special powers.”

Turkey is hardly the only government to have trouble balancing civil liberties with the special challenges involved in shutting down terrorist organizations. But Turkey’s terrorism laws aren’t just being used against al-Qaeda suspects. They’re also used against military officers, journalists, academics, defense lawyers and thousands of ethnic Kurds accused in broad, increasingly implausible terrorist conspiracies. Often charges are based on what, in other judicial systems, would be considered free speech.

These abuses are compounded by the routine manner in which Turkish judges agree to deny defendants bail. Many of those accused have been in jail for years, some for a decade, as they await trial. This amounts to routine summary punishment of the presumed innocent.

Roughly 100 journalists and publishers are in Turkish jails, one of the highest incarceration rates for members of the news media in the world. More than 200 military officers are also behind bars, charged in a series of alleged plots to topple the government with names such as Ergenekon, Sledgehammer and Action Plan Against Reactionary (read Islamist) Forces.

This month, they were joined by General Ilker Basbug, who was Chief of the General Staff, the top commander of NATO’s second largest military, until 2010. He has been charged with heading an armed terrorist organization.

Since 2009, special prosecutors have also turned on ethnic Kurds, rolling up an umbrella group that draws together Kurdish nationalists of all stripes. By November, 7,748 people had been detained and about half of them jailed pending trial as part of this operation, according to the main Kurdish political party.

Falling in Ranks

Small wonder, then, that Turkey has been sliding down international indicators of media freedoms and is now regularly upbraided by the same EU and human rights organizations that once lauded Erdogan and his party for ending capital punishment, among other important advances. In last year’s annual ranking by the Paris-based group Reporters Without Borders, Turkey placed 148th out of 179 countries, a fall of 50 places since 2005. At the same time, the number of Turkish cases filed at the European Court of Human Rights in Strasbourg has soared -- to 7,749 last year, more than double the number in 2008.

The government, to its credit, recognizes it has a problem. In January, Turkey’s justice minister proposed 88 legal amendments aimed at correcting failures of the judicial system. These measures include rescinding cases for offenses committed via the media if they carry maximum penalties below five years in jail, as well as ending summary suspensions of newspapers. Overall, though, given that most terrorism-related charges carry penalties above five years in jail, the changes are likely to have limited impact.

None of this should be seen as invalidating the so-called Turkish model. Erdogan’s formula of delivering economic prosperity in a free market, where the military takes a back seat to elected officials and an Islamic-leaning government rules under a secular constitution, remains a potent one. Turkey, if anything, is today a more necessary ally for Washington and the European Union than at any time in recent memory.

But it is up to leaders in the EU and the U.S. to do what they can to persuade Erdogan and his government to revert to the reforms of his first term in office. Otherwise, when it comes to vital areas such as media freedom and the rule of law, Turkey may have nothing good to teach.

Read more opinion online from Bloomberg View.

To contact the Bloomberg View editorial board: view@bloomberg.net.