Turkey's brief democratic moment is ending. The rise of Recep Tayyip Erdogan and the Development and Justice Party (AKP) in 2002 signaled the collapse of the militarized secular republic created by Mustafa Kemal Ataturk. The recent failed coup killed the semi-liberal democracy that briefly replaced Kemalism.

NATO is an anachronism and Ankara's membership even more so. The Cold War's premier military alliance led by the U.S. should have disappeared once the Europeans recovered from World War II and especially after the Soviet Union dissolved. Today Turkey undermines U.S. and European security. As Ankara moves toward an authoritarian one-party state, its membership in NATO becomes ever more incongruous. A civil divorce would be best for all parties.

Erdogan, who as Istanbul's mayor was jailed for publicly reading an Islamic poem, began as the reformer Turkey had spent decades waiting for. He was supported by liberals hoping for a more democratic and open society in which the military stayed in its barracks. The Europeans saw Erdogan as the man to take Turkey into the European Union.

And he delivered, at least until the AKP won its third consecutive election in 2011. Then he began moving in an unmistakably authoritarian direction. Credited with reviving Turkey's economy, Erdogan appeared to believe that AKP officials deserved to do as well financially as politically. Elected president, he built an 1100-room official residence fit for a sultan of old.

Police and prosecutors who asked too many questions about high officials' suspicious cash holdings were replaced. Military officers and others were convicted of fantastic charges based on fabricated evidence. Journalism became a risky profession, with record numbers of editors and reporters jailed or fired. Entire media companies were seized, while internet enterprises were pressured.

Those criticizing the president, including a high school student and former beauty queen, were prosecuted. A court decided that comparing Erdogan to Gollum in Lord of the Rings was a criminal offense. Noted Soner Cagaptay of the Washington Institute, Erdogan "has a track record of persecuting and prosecuting his opponents, usually on the premise that there's a conspiracy to undermine him."

Erdogan also decided that politics trumped peace, abandoning the ceasefire he had negotiated with the Kurdistan Workers' Party. Doing so reignited Ankara's bitter conflict with Kurdish separatists and reaffirmed Turkey's fervent support from Turkish nationalists. Ankara also opposed Kurdish ambitions in Syria, which had collapsed into civil war. Erdogan even attempted to drag the U.S. into the conflict against the Assad government while accommodating the Islamic State as it conquered territory and terrorized captive residents.

Last fall his government shot down a Russian aircraft for briefly violating Turkish airspace. Moscow reacted circumspectly, unlike Erdogan, but threatened a far tougher response to a second incident. Whether Ankara's act was retaliation for Russian attacks on Turkish-supported insurgents, strict enforcement of its airspace, or an attempt to entangle NATO in the Syrian conflict, the attack was irresponsible and dangerous. The alliance responded by warning Erdogan against further provocations.

Although he has began to repair the international damage--Ankara recently normalized relations with Russia--he redoubled domestic repression after the failed putsch. The government has good cause to target anyone promoting a military repeat, but the regime has treated the coup as the equivalent of the Reichstag fire for the Nazis, an excuse to launch a country-wide crackdown. Warned Turkey's one liberal party, the largely Kurdish Peoples' Democratic Party, Erdogan's campaign was "a tool and opportunity for the government to purge all opposition and limit democratic rights and freedom." The Great Purge obviously was prepared well in advance.

The regime made the unsupported claim that the cleric Fethullah Gulen, a former Erdogan ally, plotted the coup--which seemed unlikely for an elderly exile. In fact, Erdogan blamed the religious leader while the coup was still in progress, before any investigation had even begun. The military long had resisted infiltration by outside forces, including Gulenists. The latter gained ground only after the Erdogan government broke the armed forces' independence. It seemed more likely that officers, Gulenist and secularist, joined against a common foe.

Nevertheless, nearly 2800 judges were fired the day after the coup, and at least 50,000 state officials and employees were suspended or ousted in the following days: academics, policemen, governors and local governors, interior, finance, and education bureaucrats, presidential staffers, school teachers and administrators, and others. Some of those sacked had been appointed previously by the AKP. The regime even dismissed 350 members of Turkish Airlines, including cabin crew. Most apparently were thought to be affiliated with the 77-year-old Gulen, who has lived in rural Pennsylvania since 1999.

Moreover, barely a week after the attempted putsch the government took over a multitude of private institutions, including 1229 associations and foundations, 1043 schools, 35 health care organizations, 19 labor groups, and 15 universities. The government revoked press cards for journalists, preventing them from working, and closed a score of independent news sites. Guilt by association became official policy: those targeted "belong to, have ties with or are in communication with" Gulenists, claimed the regime.

The regime's attack on education has been particularly widespread. The government demanded the resignation of 1577 deans, from every Turkish university, including private institutions, ordered all university professors to cancel foreign travel, suspended 15,200 public administrators and teachers, and revoked the licenses of 21,000 private teachers, preventing them from working. An education ministry official pointed to "tip-offs that these are mostly linked with terrorist activities," meaning Gulen. Obviously these many thousands of people were not involved in the coup. Instead, the Erdogan government appeared determined to eliminate any opposition its increasingly authoritarian rule.

Exactly what Erdogan plans is unknown. While the formal suspension of the European Convention on Human Rights and imposition of a state of emergency might only be temporary, in practice they seem unlikely to end. Erdogan claimed to be acting to protect "democracy, the rule of law and rights and freedoms of our citizens," but he has been ostentatiously violating all of them for years. Now the situation is likely to get far worse.

Erdogan has been emboldened, the opposition has been weakened, critics have been silenced, and restraints on the government have disappeared. Deputy Prime Minister Mehmet Simsek predicted that the government would authorize creation of committees to assess the guilt of tens of thousands of people accused of disloyalty. This proposal echoes the violent purges of Maoist China and Islamist Iran, which inflicted mass injustice and disrupted social development.

"As Turkey descends more deeply into repression and conflict, its value to NATO decreases ever further. "

Punishing most anyone thought to oppose Erdogan and the AKP also risks making violence the only form of opposition possible. Yet even before the coup ISIS terrorism and Kurdish resistance were growing. Now Turkey's ravaged military will be less able to battle these foes.

As Turkey descends more deeply into repression and conflict, its value to NATO decreases ever further. Of course, Ankara retains advocates. Robbie Gramer of the Transatlantic Security Initiative argued: "The anti-ISIS coalition, strategically important American and NATO bases in Turkey, NATO's posture toward Russia, and the EU's migration deal would all be at risk if NATO forced Turkey out. Given the array of threats the alliance faces, NATO could not afford to put any of this at risk."

However, Gramer greatly inflates Turkey's geopolitical value. Ankara's 1952 membership is a Cold War artifact. The Soviet Union and Warsaw Pact no longer exist, ending any serious military threat to Europe. Nothing has changed with Vladimir Putin: there is no evidence that Moscow has the slightest interest in staging a blitzkrieg through the Balkans, let alone to the Atlantic Ocean. Russia's brutal treatment of Georgia and Ukraine is essentially defensive against an expanding NATO, not offensive in attempting to recreate the Soviet empire. There is no renewed Russian threat for Turkey to combat.

Actually, Ankara has become worse than useless for U.S. security. NATO itself is more burden than asset for America. The Europeans are capable of confronting any threat from a much weaker Russia as well as challenges created by conflict in North Africa and the Middle East. The continent refuses to spend seriously on its own security because it expects the U.S. to step in.

Turkey's primary military benefit to Washington is access to Incirlik airbase, which is not in fact contingent on Ankara being part of NATO. Moreover, the Erdogan government's cooperation is not guaranteed. It failed to back the U.S. in its invasion of Iraq and initially barred attacks on the Islamic State. Turkey also controls the Bosphorus Straits, but has an independent interest in constraining Russian activity in the Black Sea, which is of only limited interest to America. Finally, Ankara routinely violates the airspace of fellow NATO member Greece and continues to maintain troops on the island of Cyprus, divided by a Turkish invasion four decades ago.

Wishful thinking cannot overcome such a record. It should be apparent that the alliance has little influence over Turkey's behavior. Hoping to appease Erdogan, James Stavridis, dean of the Fletcher School at Tufts and former NATO commander, argued that "the United States should use NATO as a mechanism to support Turkish positions," yet those stances are largely antithetical to America's interests. Nor is there any reason to believe that Ankara would become more pliable if Washington sacrificed America's basic interests.

Moreover, Ankara probably would not qualify for alliance membership today. It is engulfed in multiple conflicts largely of its own making. The government's refusal to address the aspirations of the large Kurdish minority led to an extraordinarily brutal military campaign in the 1980s and 1990s which could have induced Western intervention had the culprit not been a member of NATO: 4000 towns were destroyed, 30,000 or so people were killed, and three million people were displaced.

The Erdogan government won plaudits from abroad for forging a ceasefire, which Erdogan jettisoned last year for political purposes. Now the conflict burns anew. Ankara recently expanded its military efforts to include Syria's Kurds, who have created their own autonomous zone.

Moreover, Turkey fostered conflict in Syria and terrorism at home. Early in the civil war the Erdogan government backed the ouster of Syrian President Bashar al-Assad and attempted to drag the U.S. into the horrid imbroglio. The latter objective might explain Turkey's otherwise inexplicable decision to down a Russian aircraft. Had Moscow retaliated NATO could have found itself involved in war.

The Turkish government also aided the rise of the Islamic State by turning a blind eye to the latter's cross-border activities, a decision which backfired badly. Already responsible for an increasing number of terrorist attacks, Daesh might attempt to regroup in Turkey once its "caliphate" disappears. The group then might not be easily dislodged.

At the same time, Turkey no longer meets the democracy and human rights standards for new members. In fact, Secretary of State John Kerry warned Ankara against moving away from the alliance's "requirement with respect to democracy" in the aftermath of the coup. NATO was willing to overlook such blemishes in the past, but today's descent to authoritarianism is much harder to accept.

Especially since Erdogan appears to be following a script written years ago. Before taking power Erdogan said "democracy is like a streetcar. When you come to your stop, you get off." Unfortunately, that stop turned out to be authoritarianism.

Further, the regime is distancing itself from the West. Labor minister Suleyman Soylu blamed America for the coup, while an AKP MP, Aydin Unal, claimed that U.S. soldiers dressed as Turks participated in the fighting. Turkey's ambassador to the U.S. Serdar Kilic merely replied "I hope not" when asked if America was involved. The regime also blamed the U.S. for hosting Gulen. President Erdogan said any state that harbored those involved in the coup would be considered "at war" with Turkey. Prime Minister Binali Yildirim claimed that Washington's request for evidence of Gulen's guilt before bustling him off to Ankara's tender mercies called into question the two nations' friendship. Obviously that relationship does not include respect for the rule of law.

NATO has become a self-parody, including countries such as Montenegro, which has 2080 men under arms--fewer than the number arrested by Turkey in the coup's aftermath. However, at least Podgorica is harmless, a modern day variant of the fictional Duchy of Grand Fenwick in the novel The Mouse that Roared. In contrast, Turkey is turning into a security black hole.

Ankara's political limitations also are becoming more evident. During the Cold War Washington supported a succession of brutal dictatorships. But that world has disappeared. The growth of Putinism in Ankara today is a terrible embarrassment, with no corresponding security benefit for America as compensation. And the price will only rise.

The U.S. should change its approach to reflect changing circumstances. Turkey's membership in NATO no longer serves America's and Europe's interests. This article was first posted to Forbes online.