Markets are more powerful than the sternest tyrant.

Recep Tayyip Erdoğan is learning a lesson that history has taught, sometimes harshly, to many men of his kind in the past: Tyrants have power, but markets have more power.

If you are a tyrant, you can declare a “state of emergency” to give yourself special powers. Indira Gandhi did it to crack down on political opponents in 1975, and Pervez Musharraf did it for the same reason in 2007. At the close of the Cold War, KGB boss Vladimir Kryuchkov tried to do it to reverse perestroika. And President Erdoğan did it to consolidate his political power. What he did with his expanded powers was predictable: He dismissed more than 100,000 public officials who did not support him politically; he shut down critical newspapers and media outlets, along with troublesome schools, charities, and civil-society groups, seizing their assets without compensation. He arrested 50,000 people on trumped-up terrorism charges and held many without trial. He seized the passports of dissidents and froze their bank accounts.

But capital in the 21st century is slippery. It is restless, and it will not sit still for abuse. It is difficult to seize. The iron fist of tyranny is no good against 21st-century capital, which slips between the tyrant’s grubby little fingers like water. Turkey’s currency, the lira, lost half its value as the world’s investors discovered themselves having second thoughts about exposing themselves to the caprices of a vicious autocrat. Erdoğan, for all his sultanic pretense, is nearly defenseless against the power of simple preference.

Do you know a good way to tell when the world doesn’t really buy your national economic narrative? Credit markets will not lend to you in your own currency. Turkey’s banks, its nonfinancial businesses, its government, and its private households borrowed enormous sums denominated in foreign currency — debt equal to about 70 percent of GDP. This compares to 27 percent for Brazil, 33 percent for Russia, 35 percent for Indonesia, and 50 percent for South Africa. The denomination of this debt presents Turkish debtors with a problem: Those debts denominated in yen, euros, and good old-fashioned dollars stay about the same . . . when you measure them in yen, euros, and good old-fashioned dollars. When you measure them in Turkish lira, which is what Turkish businesses and private individuals mostly get paid in, those debts doubled in local terms as the value of the lira fell by half.

Jeremy Warner of the Telegraph puts it succinctly: “Lest you think this all part of a Western conspiracy to keep emerging markets in their place, as Erdoğan seems to, would you swap your dollars, euros, yen and pounds to lend instead in Turkish lira or Argentine pesos?” Of course not. “It’s a lesson that has to be constantly relearnt; you cannot, as Margaret Thatcher once said, buck the markets. This doesn’t stop the politicians repeatedly trying.”

Paul Krugman writes up a prescription in the New York Times: “Stop the explosion of the debt ratio with some combination of temporary capital controls, to place a curfew on panicked capital flight, and possibly the repudiation of some foreign-currency debt. Meanwhile, get things in place for a fiscally sustainable regime once the crisis is over. If all goes well, confidence will gradually return, and you’ll eventually be able to remove the capital controls.” Krugman and Warner both cite the case of Malaysia, and Mahathir Mohamad’s response to the Asian financial crisis in 1998.

Erdoğan, like the chavistas in Venezuela and Cristina Fernández de Kirchner, has pursued an economic policy that is equal parts nationalism, welfare populism, and corruption.

It’s getting to that “fiscally sustainable regime” that’s the hard part.

Erdoğan, like the chavistas in Venezuela and Cristina Fernández de Kirchner, has pursued an economic policy that is equal parts nationalism, welfare populism, and corruption. In Argentina, the nationalization of private pensions announced an assault on private property and the rule of law. The case of Venezuela is too well known to require further elaboration here. Kirchner blamed the Argentine crisis on “economic terrorists,” and Nicolás Maduro of Venezuela consulted the old Soviet hymnal and came up with “saboteurs and hoarders.” (Can liquidating the kulaks as a class be far behind?) Erdoğan and his gang blame “speculators” and the previously unheard-of “high-interest-rate lobby,” who are conducting a plot to enrich themselves on “the sweat of the people.” Meanwhile, members of his clique have been exposed receiving eight-figure bribes, but that, too, is said to be a plot, this one carried out by coup-minded followers of Fethullah Gülen, a critic of the Erdoğan regime. Among those denounced as followers of that Islamic cleric are Senator Chuck Schumer (D., N.Y.) and Preet Bharara, the former U.S. Attorney for the Southern District of New York. As much as one might celebrate the implied ecumenical spirit, this seems unlikely to be true.

RELATED: ‘Trump Frustrated that U.S. Pastor Is Still Imprisoned by Turkey’

“Argentina also did quite well with heterodox policies in 2002 and for a few years after, effectively repudiating 2/3 of its debt,” Krugman writes. “But the Kirchner regime didn’t know when to stop and turn orthodox again, setting the stage for the country’s return to crisis.”

For some countries, crisis ends up being a more or less permanent state. Erdoğan, of all people, ought to be mindful of that: It was an earlier economic crisis that propelled him to power.

Illiberal government and liberal economic policies rarely can coexist for very long. One or the other will change.

The conspiracy that has convulsed the Turkish economy is right there in front of our noses. It isn’t in the shadows, it isn’t secret, and it isn’t even a conspiracy. It is only the endless — and, in our time, instant — rebalancing of yield and risk. In the wake of the financial crisis of 2008–09, investors went hunting for returns, and their quest took them to places few of them had been before, such as commercial lending in Turkey. The economy boomed as all that capital flowed in. But doing business with tyrants, or under the thumbs of tyrants, is risky. The “liberal dictator” that F. A. Hayek preferred to illiberal democracy exists only in theory. In the real world, economic policy is very strongly dependent on political conditions. Illiberal government and liberal economic policies rarely can coexist for very long. One or the other will change.

Many tyrants and ordinary incompetent governments have presided over short-term booms and been buoyed by them. Remember Hugo Chávez being lionized by beaming Democratic grandees while handing out discounted heating oil? That kind of thing can provide some mileage, but it isn’t sustainable. What’s sustainable is secure property rights, the rule of law, an independent judiciary, enforceable contracts, flexible labor markets, free trade, investment, and entrepreneurship. The United States does many things differently from Sweden, Germany, Singapore, Switzerland, Iceland, and Japan, but what the countries that have achieved long-term prosperity all have in common is more important than the top income-tax rate or health-insurance regulations. There are things each of those countries could improve on: Singapore has some troubling illiberal tendencies, and the United States has a corruption problem. But there’s a reason Sony can borrow in yen and Uncle Stupid can borrow in dollars, and why one of Switzerland’s economic challenges in recent years has been that its currency is too popular.

Another way of saying this is: Right now, Turkey’s pressing problems are economic. In the long term, Turkey’s problem is political. Investors might be tempted by the occasional one-night stand with tyranny, but they’re in a long-term relationship with liberalism — with democracy, property, and the rule of law.

Erdoğan wants his people to boycott iPhones. Given the state of the lira, few of them will be able to afford one.

Erdoğan can lock up dissidents and shut down newspapers. But he can’t lock up the markets, and the markets are no longer buying what he’s selling.