As Turkish authorities grapple with the agony of a mounting death toll from the deadliest earthquake in a century, President Recep Tayyip Erdogan is confronting a parallel crisis: the disaster’s blow to an economy that was already in urgent need of repair.

The quake, which has killed more than 40,000 people in Turkey and thousands more in neighboring Syria, will saddle Turkey with a staggering reconstruction bill and weakened economic growth, posing a fresh challenge to Erdogan as he seeks a third four-year term and maintain a grip on his political fortunes before a crucial presidential election in May.

Before the devastation, which also left millions homeless, Turkey was already reeling from a collapsing currency and runaway inflation that had reached an annual rate of 85% in October. Those vulnerabilities have punched holes in the nation’s balance sheet and tipped Turkish families and businesses into a cost-of-living crisis.

Aggravating the problems are unorthodox financial policies pursued by Erdogan, a strongman leader who has tightened his control over the economy and strengthened ties with Russia and the Gulf States to help bolster Turkey’s finances.

Reconstruction is expected to cost $10 billion to $50 billion, although the Turkish Enterprise and Business Confederation has put the total closer to $85 billion. More than 8,000 buildings were flattened and supply chain infrastructure, including roads and the Iskenderun seaport, were damaged when the quake rocked southern Turkey. The area, a manufacturing and maritime transport hub that was also home to thousands of war-hit Syrian refugees, accounts for 9% of Turkey’s economic activity.

Secretary of State Antony Blinken stopped Sunday at the Incirlik Air Base in southern Turkey, where the United States is distributing relief supplies to quake-stricken areas. From there, Blinken flew in a Blackhawk helicopter around the city of Antakya and saw dozens of damaged and destroyed buildings. Noting that relief efforts were moving from rescue and recovery to humanitarian aid, Blinken announced $100 million in new U.S. assistance for people affected by the earthquake. The State Department said the new spending brings total U.S. aid to $185 million.

“The recovery operation is on,” Blinken told reporters at the Incirlik Air Base, from which the United States has long operated. “It’s going to take a massive effort to rebuild. But we’re committed to supporting that effort.”

The situation in Turkey remains dire, with emergency crews still extracting the dead from the ruins of apartment buildings and homeless survivors sheltering in cars and making bonfires from wreckage to stay warm. They are also short on food, fuel and medical supplies.

Analysts say Erdogan, who has been criticized for his handling of relief efforts, is doubling down on an autocratic playbook for managing the economic and political fallout.

“His main focus is on the elections,” said Soner Cagaptay, director of the Turkish Research Program at the Washington Institute for Near East Policy. “Erdogan has never won without delivering growth, and he will be seeking a rebalancing effect once reconstruction starts.”

Brushing off accusations of crony ties between his government and Turkey’s construction industry, Erdogan earlier this month ordered the detention of dozens of building contractors and announced a fast-track rebuilding program to start replacing thousands of destroyed homes within one year.

Turkey’s economy had been slowing from an 11% growth rebound in 2021 from the pandemic, and it had been expected to grow 3% this year and next, according to the European Bank for Reconstruction and Development.

The earthquake could now reduce growth by at least one-third — but Erdogan’s huge rebuilding effort will limit the hit, the bank said.

“Economic activity could rebound quickly after the quake,” said Liam Peach, senior emerging markets economist at Capital Economics in London. “Any impact this quarter will be made up.”

Whether that is enough to resolve Turkey’s entrenched economic problems remains to be seen.

The Turkish lira lost nearly 30% of its value against the dollar in the past year as inflation soared, severely damaging Turks’ purchasing power and hurting Erdogan’s popularity. In January, inflation cooled slightly, to an annual rate of just under 60%, as energy prices fell.

Turkey also faces a mountain of external loan payments, worth nearly $185 billion, that have grown harder to pay off because of a plunge in foreign currency reserves, raising fears of a crisis. International investors, worried about heavy debt burdens at Turkish companies, have increasingly pulled money from the country since 2018.

Turkey’s current state is in sharp contrast to Erdogan’s first 15 years in power, when he revived the economy after becoming prime minister in 2003. He pursued liberal economic policies and a debt-fueled construction spree that spawned high-rise office towers and a new Istanbul airport. More Turks became prosperous, the middle class expanded and Turkey overcame its status as an emerging market laggard.

But the gains unraveled as he tightened his grip on the country, asserting control of the judiciary and the media, firing three central bank governors and naming his son-in-law finance minister. To help shore up Turkey’s finances, he leaned more heavily on Qatar, Saudi Arabia and the United Arab Emirates, whose autocratic leaders are keen on keeping him in power.

“He has been a useful counterbalance to the West,” said Timothy Ash, sovereign strategist for emerging markets at BlueBay Asset Management in London. “That is what the Gulf countries want.”

More recently, Erdogan has played both sides of Russia’s war against Ukraine for economic advantage, said Marc Pierini, a senior fellow at Carnegie Europe and a former European Union ambassador to Turkey. As bad as the economy is, it would be worse without Turkey’s energy trade with Russia, and the money that it reels in.

Headed into the presidential elections, “Erdogan will use all imaginable means to stay in power,” Pierini said.

“Irrespective of the reconstruction effort and whatever flow of money might be generated,” he said, “the economic outlook is linked to the result of the upcoming election, because there is the possibility that for the first time in 20 years he could be defeated.”