The usually bustling open market in the Kadıköy district of Istanbul was half full on Sunday. Shop owners had increased their prices twenty per cent over the past two weeks. The cost of a package of eggs had risen by fifty per cent in a week; the price of bananas imported from Latin America had doubled. Aynur Keskin, a homemaker with two school-aged children, bought a few items and shook her head, dismayed at the rising inflation, a result of the country’s ailing economy and the plummeting Turkish lira. “I was thinking of going abroad for a holiday, but that’s a dream now,” she told me.

Mesut Taşkıran, the owner of a Kadıköy grocery store, told me he has started hoarding money and limiting his personal spending. “If things continue to go higher, we might have to shut down,” he said, referring to his shop.

For years the Turkish economy has been on a downward spiral, due to burgeoning international debt and Turkish President Recep Tayyip Erdoğan’s policy of keeping interest rates artificially low. In the last several weeks, a dispute between Erdoğan and President Donald Trump has accelerated a drop in the value of the Turkish lira, which fell to a record low on Monday of 7.24 to the dollar. (A year ago, a dollar could buy three and a half lira; two years ago, three.) By the end of the day Wednesday the value had rebounded slightly, but investors, business leaders, and Turkish government officials still feared that the economy might crash.

In the past decade, Turkey’s growing economy attracted a flood of foreign investment. But recent diplomatic rifts between Turkey and the West, declining tourism, and Erdoğan’s authoritarian consolidation of power—which was cemented in June elections that granted him sultan-like powers—caused many investors to pull out and sell off their Turkish debt, slowing the economy’s pace and accelerating inflation. Debt in foreign currencies, most of it in dollars, now represents around seventy per cent of the Turkish economy. American investors now own more than fifty per cent of publicly traded Turkish stocks, according to the Institute of International Finance. “The government’s policies have caused the problems,” Yüksel Gönül, an employee at a dairy store, told me. “But we are the victims.”

Erdoğan and Trump have been exchanging public taunts—and economic sanctions—over Turkey’s two-year imprisonment of Andrew Brunson, an evangelical American missionary accused of espionage, links to terrorist groups, and involvement in the failed Turkish coup in 2016. Brunson, who faces up to thirty-five years in prison, has denied the charges.

On July 25th, Turkey moved Brunson to house arrest, a concession that Trump deemed inadequate. The following day, in a tweet, Trump announced that “The United States will impose large sanctions on Turkey for their long time detainment of Pastor Andrew Brunson, a great Christian, family man and wonderful human being.” A week later, he implemented sanctions against Turkey’s justice and interior ministers, freezing their U.S. assets and barring them from doing business with American citizens. Turkey responded by sanctioning the officials’ American counterparts, before Trump announced, on Friday, in another tweet, that the U.S. would be doubling its tariffs on Turkish steel and aluminum.

Turkish analysts told me that Trump’s tweets enraged Erdoğan and his aides, and even offended Turkey’s opposition parties, most of which bitterly opposed Erdoğan in the June election, to the extent that they sided with the government against Trump. Erdoğan, in a defiant speech addressing an assembly of foreign ambassadors, said, “The bullies of the global system cannot roughly, shamelessly encroach on our gains that were paid for by blood.” On Tuesday, Erdoğan announced boycotts of U.S.-made electronics, and urged Turkey’s eighty million citizens to stop buying iPhones in particular, calling Trump’s sanctions against Turkey an “explicit economic attack.” The Russian foreign minister, Sergey Lavrov, during a concurrent visit to Turkey, accused the Trump Administration of using “sanctions, threats, blackmail, and diktat” against Turkey, Russia, and Iran. In an Op-Ed published in the Times on Friday, Erdoğan wrote that “Washington must give up the misguided notion that our relationship can be asymmetrical and come to terms with the fact that Turkey has alternatives,” perhaps hinting at an alliance with Russia. “Failure to reverse this trend of unilateralism and disrespect will require us to start looking for new friends and allies.”

Elmira Bayrasli, a professor of international affairs at Bard College, told me that both Presidents were trying appear strong to their core supporters at home. “What you’re seeing right now is Donald Trump using any opportunity to show his leadership ability and his sense of power. Erdoğan’s doing the same thing that Donald Trump is doing—scoring cheap political points,” Bayrasli told me. “Erdoğan’s a shrewd politician. He has a pulse on the Middle East, and the mood is people are tired of being pushed around by the West, especially [amid] the growing anti-Islamism since 9/11.” Matthew Bryza, a former American diplomat and a senior fellow at the Atlantic Council, who now lives in Turkey, said that, following the NATO summit in Brussels, in early July, Trump and Erdoğan “were very close to an agreement.” But, after Erdoğan placed Brunson under house arrest instead of releasing him, “the U.S. side lost patience.”

Brunson has lived in Turkey for more than two decades, doing missionary work and running an evangelical church in the coastal city of Izmir. He was detained on charges of being linked to both Fethullah Gülen, an elderly Islamist cleric, living in exile in Pennsylvania, whom the Turkish government accuses of masterminding the failed coup, and the Kurdistan Workers’ Party, or P.K.K., a separatist group that has battled Turkish forces in the country’s southeast for nearly thirty-five years. Erdoğan has repeatedly demanded that Gülen be extradited to Turkey, but the Obama and Trump Administrations, in concert with the Justice Department, have said that Turkey’s evidence against him is insufficient.

In Brunson’s indictment, two unidentified witnesses, code-named “Fire” and “Prayer,” claim that Brunson was proselytizing Christianity to members of the P.K.K., so that they could receive asylum in the West. He was found to be in contact with members of the Gülen network, and expressed displeasure, in a text message to a friend in Canada, that the coup had failed. Brunson was also accused of holding regular meetings with members of the American military at Incirlik Air Base, in southern Turkey. In a court appearance, on April 16th, Brunson claimed innocence, saying that he simply wants to “do Jesus’s work.” “I’ve never done something against Turkey. I love Turkey. I’ve been praying for Turkey for twenty-five years,” he said. “I want truth to come out.”

Turkish officials have expressed surprised at how important Brunson is to the Trump Administration, considering that several other Americans, including the NASA engineer Serkan Gölge, are also jailed in Turkey. Turkish officials suspect that Trump and Vice-President Mike Pence, who have strong political support from evangelical Christians in the U.S., believe that Brunson’s release could increase Republican voter turnout in the midterm elections in November. “Given the highly visible role of Vice-President Pence, the Turks believe there was a political calculation about garnering more of the evangelical vote,” Bryza said.