Copyright The New York Times

In September, just days after tens of thousands of Turks had poured into the streets to protest President Recep Tayyip Erdogan’s latest crackdown on his political opponents and a faltering economy, Mr. Erdogan stood smiling beside President Trump at the White House. The price of the long-coveted meeting had been steep: Ahead of it were reports that Turkey would purchase Boeing planes and F-16s, and Ankara announced the scrapping of additional tariffs on U.S. goods and a 20-year deal to purchase U.S. liquefied natural gas. But for Mr. Erdogan, it was surely worth it: His foreign policy partnerships, especially with the West, have given him the political cover and economic lifeline to tighten his grip on power just as he moves to dismantle the last remaining pillars of Turkish democracy. Mr. Erdogan’s photos with the president of the United States were a particular prize, and sent a powerful message back home. So did the photos last week of Mr. Erdogan shaking hands with Friedrich Merz, the German chancellor, and Prime Minister Keir Starmer of Britain. This is a time for realpolitik, and the world is prepared to do business with useful strongmen like Mr. Erdogan — even if that makes the struggle infinitely harder for pro-democracy voices in Turkey and elsewhere. In March, Turkish police detained Ekrem Imamoglu, Istanbul’s mayor and Mr. Erdogan’s chief rival, along with many of his associates, on corruption and terrorism charges. The enormous protests that followed suggested that after more than 20 years in power, Mr. Erdogan might have finally gone too far. But months later, more than 10 mayors from the main opposition Republican People’s Party, known as the C.H.P., including Mr. Imamoglu, remain in prison, alongside hundreds of C.H.P. members and officials. To the surprise of many, the protests have continued, but Mr. Erdogan shows no sign of concern. Instead, he has intensified his crackdown: A Turkish court recently issued yet another arrest warrant for Mr. Imamoglu, this time on charges of “political espionage.” Mr. Erdogan rose to power promising to fight corruption, reduce poverty and expand freedoms. For a time, he delivered — Turkey even started E.U. accession negotiations in 2005 — but years of economic mismanagement and democratic backsliding did more than just erase the gains made in the early years of his presidency; they also left Turkey poorer, more divided and less free. Dissatisfied voters dealt Mr. Erdogan a major blow in the 2019 municipal elections, when his party lost many major cities. As his popularity slipped and Turkey’s economy faltered, Mr. Erdogan turned to foreign policy for both cash and credibility, making a bet that Turkey’s strategic indispensability would buy if not always silence, then at least reluctant acceptance. He had good reason to believe that it would. In early 2016 the European Union, desperate to stem the influx of refugees from Syria, struck a migration deal with Turkey. The bloc pledged €6 billion for refugee support — the previous fall it had even delayed a damning human rights report to keep Mr. Erdogan on board. That bargain showed Mr. Erdogan what he needed to know: If Turkey delivered on Europe’s interests, Europe would look the other way. Since then, Turkey’s strategic value has only grown. Mr. Erdogan has walked a particularly fine diplomatic line since Russia’s full-scale invasion of Ukraine in 2022, keeping channels open to both Russia and Ukraine while deepening his cooperation with Western capitals. And Turkish defense firms have emerged as crucial suppliers to Ukraine. One munitions plant in Texas, inaugurated last year, uses Turkish-built production lines — assembled on-site by Turkish workers — and is expected to supply about a third of the Pentagon’s production target. The war in Ukraine has also accelerated Europe’s push to build up its defense capacity, a drive reinforced by Mr. Trump’s return to the White House and renewed doubts about the U.S. commitment to NATO. Here, too, Turkey is vital. The E.U.’s top diplomat, Kaja Kallas, announced Ankara’s inclusion in the bloc’s new SAFE initiative in June, giving Turkey access to defense funding and joint procurement. And just last week, as Turkish prosecutors were accusing Mr. Imamoglu of indirectly spying for British intelligence, Mr. Starmer sealed the sale of Eurofighter jets to Turkey in a meeting with Mr. Erdogan in Ankara. A couple of days later, Mr. Merz was there, saying that there was “no way around a good and deepened partnership.” Turkey stations thousands of troops in Syria, where preserving stability is crucial for Europe in preventing another wave of refugees, and maintains a military presence in Libya, wielding leverage over another conflict that European governments fear could drive migrants toward Europe’s shores. In the South Caucasus, a vital corridor for trade and transport for Europe, many European capitals now look to Turkey as the broker most capable of pressing Azerbaijan toward lasting peace with Armenia. This emphasis on practicality is a sign of the times — a transactional United States, an aggressive Russia, a febrile Middle East. Europe’s immediate concern is its defense. And Turkey, with its proximity to conflict zones, military strength and expanding defense industry, is strategically significant. But Western capitals should be wary of treating democracy in Turkey as a luxury rather than a necessity. Turks are not about to quietly surrender their right to choose their leaders. As long as they keep up the fight, Mr. Erdogan will find it difficult to consolidate his rule — no matter how much cover he gets from the West. And that is not just Mr. Erdogan’s problem, but an enduring one for the democracies that have staked so much on him.