President Recep Tayyip Erdogan hopes to renew his hold on power in elections next month. His authority is not yet absolute: a judge recently ordered the release of several journalists convicted on dubious terrorism charges. Although they are now free on appeal, few observers believe they will ultimately prevail in a judicial system dominated by Erdogan.

Since the attempted coup in July 2016, the government has arrested around 160,000 people, imprisoned an estimated 50,000, and tossed another 152,000 public employees from their jobs. Many of the latter are effectively unemployable, denied government work while private employers are afraid to hire them. Substantial numbers of Turks have lost jobs at private companies responding to government pressure.

Among those arrested was Taner Kilic, the Turkey chair of Amnesty International. Journalists also have endured Erdogan’s wrath: 300 have been detained and 160 have been tried so far. Personal assets and entire businesses have been confiscated, and more than 1,500 non-governmental organizations have been shut down, mostly for alleged terrorist offenses.

Turkey’s tilt toward dictatorship does not make it unique among America’s allies. At least the Turkish government still holds elections that allow some genuine opposition. In fact, Erdogan advanced the presidential and parliamentary elections from 2019 to June 24 to improve his chances, though few imagine him losing.

However, Turkey’s political environment is still far from free. Human Rights Watch pointed out that last year’s constitutional referendum, which barely passed, was conducted “in an environment of heavy media censorship, with many journalists and parliamentarians from the pro-Kurdish opposition in jail.” Last month the UN High Commissioner for Human Rights Zeid Ra’ad al-Hussein urged the end of the state of emergency. He observed: “It is difficult to imagine how credible elections can be held in an environment where dissenting views and challenges to the ruling party are penalized so severely.”

More serious for Washington, Ankara no longer is a true U.S. ally. Turkey’s activities increasingly inhibit important American international objectives and are inconsistent with its membership in NATO.

The Muslim state gained its reputation as a critical ally during the Cold War, guarding Europe’s southeastern flank. Yet after downing a Russian plane in 2015, Erdogan did more than mend relations with the Putin government: Turkey formed a working relationship with Moscow in Syria. Even though they disagree on the appropriate fate of the Assad government, both want the U.S. out of northern Syria.

Turkey’s incursion directly threatens U.S. policy. Kurdish forces were America’s most faithful ally against ISIS in Syria. They unsurprisingly felt betrayed by the U.S., and may be less than enthusiastic about backing other American objectives. Worse, the Turkish invasion has placed the United States in between the combatants, leading Turkish officials and American military officers to exchange threats as Ankara threatened to attack U.S. forces based near Kurdish militias.

Ankara has always prioritized combatting Kurdish militias and preventing the emergence of an autonomous Kurdish state along its border over fighting the Islamic State. Indeed, in the early years of Syria’s civil war, Ankara cooperated with ISIS, tolerating the cross-border movement of men and materiel and sale of captured oil.

Turkey once earned brownie points in Washington for supporting Israel. However, Erdogan has since shifted in an Islamist direction and taken a distinctly hostile stance toward Israel. Cyprus also remains divided by Turkey’s 1974 invasion. In the name of its client, the Turkish Republic of Northern Cyprus, Ankara has actively interfered in Cyprus’s attempt to develop off-shore natural gas deposits.

Ankara also threatens Greece, another NATO ally. Turkey never accepted Greek sovereignty over nearby islands and the surrounding sea, and Turkish air and sea incursions have increased in recent months. The game turned deadly in April, when a Greek pilot died in a crash after intercepting two Turkish planes in Greek airspace. Greece just announced plans to spend $1.45 billion to upgrade its F-16 interceptors to better match Turkey’s. Ankara’s pending purchase of Russian S-400 missiles poses another challenge to the transatlantic alliance.

If Turkey acted like a real ally it would be easier to tolerate Ankara’s growing authoritarianism, including when Erdogan’s visiting bodyguards literally beat peaceful American protesters outside the Turkish embassy in May 2017. After all, Washington has rarely allowed a few human rights violations to get in the way of a beautiful geopolitical friendship. But the Erdogan government fails on both counts.

Erdogan was a liberator when his party first won in 2002; many liberals backed the Justice and Development Party, or AKP, as it ended the military’s dominant role in Turkish politics. However, as the decade came to an end, corruption increased. Erdogan demonstrated less tolerance for opposition. He launched political trials of generals and other critics, investigated businessmen who opposed him, and seized control of media companies. He launched a wave of repression against the Kurds. His ambitions grew along with his intolerance of criticism: he even filed charges against schoolchildren for insulting him.

Then the coup attempt became his Reichstag Fire, offering a perfect excuse for additional repression. In March, the UN Human Rights Office detailed abuses of the state of emergency, first imposed in July 2016. The result has been “profound human rights violations against hundreds of thousands of people—from arbitrary deprivation of the right to work and to freedom of movement, to torture and other ill-treatment, arbitrary detentions and infringements of the rights to freedom of association and expression.”

Erdogan directed his fire at purported followers of Muslim cleric Fethullah Gulen, who without evidence the Turkish president blamed for orchestrating the coup. He defined membership in FETO, the Erdogan-proclaimed Fethullah Terrorist Organization, very broadly: holding an account at a bank owned by a Gulenist or attending a school run by a Gulenist is enough. In practice, Gulenist and terrorist have become labels applied to most anyone critical of Erdogan’s person or policies.

Every independent assessment of Turkish human rights is negative. Amnesty International observes: “Dissent was ruthlessly suppressed, with journalists, political activists and human rights defenders among those targeted. Instances of torture continued to be reported.” Demonstrations have been banned. Government officials enjoy “pervasive impunity” for abuses. “Public sector workers continued to face summary dismissal for alleged unspecified links to terrorist groups.”

The State Department’s latest human rights report runs 64 pages. It highlights as the most significant issues: “alleged torture of detainees in official custody; allegations of forced disappearance; arbitrary arrest and detention under the state of emergency of tens of thousands, including members of parliament and two Turkish-national employees of the U.S. Mission to Turkey, for alleged ties to terrorist groups or peaceful legitimate speech; executive interference with independence of the judiciary, affecting the right to a fair trial and due process; political prisoners, including numerous elected officials; severe restriction of freedoms of expression and media, including imprisonment of scores of journalists, closing media outlets, and criminalization of criticism of government policies or officials; blocking websites and content; severe restriction of freedoms of assembly and association; interference with freedom of movement.”

Unsurprisingly, there is an increasing exodus of the educated elite, including business and opinion leaders and students. But even distance offers little protection: Erdogan has pursued his critics abroad, dragging back dissenters from friendly states such as Kosovo. He’s set loose Interpol against people merely accused of following Fethullah Gulen. His minions are even seeking some Americans, such as Michael Rubin of the American Enterprise Institute and former U.S. attorney for the Southern District of New York Preet Bharara, for trial on bizarre charges.

Of course, there is little that the U.S. can do to transform Turkey internally, short of invasion. The Turkish population is deeply hostile to America and Erdogan may gain politically from any public attacks by Washington.

However, the Trump administration should still respond to Turkey’s ongoing malformation. On the security side, the U.S. should downgrade its reliance on Incirlik Air Base and remove its nuclear weapons. The latter could become hostages in any serious confrontation. Moreover, Washington should propose the creation of a process to reassess NATO membership. Ankara almost certainly would not be invited to join today, so why should it stay?

As for human rights, the administration should make Turkey pay a price for the unfair prosecution and incarceration of U.S. citizens. Cutting off weapons sales would be one possible step. The U.S. should also protect Turkish citizens in America from political prosecution back home: extradition should be allowed only through appropriate court processes where the proceedings have a reasonable chance of being fairly conducted.

Turkey once was viewed as a Western success story, a country that would be a model Islamic democracy. That tale always was oversold, but today it has no meaning. Washington should take a much colder view of a country that increasingly shares neither America’s interests nor its values. The two governments should cooperate when appropriate, but Washington should abandon its illusion that Turkey remains an ally in anything but name.

Doug Bandow is a senior fellow at the Cato Institute. A former special assistant to President Ronald Reagan, he is author of Foreign Follies: America’s New Global Empire.