ANKARA, Turkey (AP) — Turkey’s central bank on Thursday raised its key interest rate sharply, from 17.75 percent to 24 percent, to contain inflation and stem the currency crisis that has been destabilizing the country this summer.

The bank’s move is long overdue, many independent economists say, and suggests it is re-asserting its independence after President Recep Tayyip Erdogan repeatedly and publicly pushed it to keep rates low.

The Turkish lira began to recover shortly after the rate hike, strengthening by 3.4 percent to 6.18 against the dollar.

The currency has plunged in recent months and even after Thursday’s rise was down almost 39 percent against the dollar this year. Investors are mainly concerned about Erdogan’s economic policies and an ongoing diplomatic and trade dispute with the United States over the detention of an American pastor on espionage and terror-related charges. Washington imposed sanctions on two government ministers and doubled tariffs on steel and aluminum imports from Turkey.

Turkey’s woes are also part of wider jitters in developing countries as investors pull their money out of the fast-growing — but often fragile — emerging economies to return it to safer markets like the U.S.

In a statement, the central bank noted Thursday that the local economy is weakening and inflation is rising. The rate hike could pinch growth more, but experts say it’s needed to contain inflation of around 18 percent and support the currency. The central bank said it would keep high rates until inflation eases.

Istanbul-based economist Ozlem Derici Sengul said investors were worried about the central bank not being able to take such action due to political pressure, so “the move built credibility.”

But analysts say the move will not be enough to quickly erase international investors’ concerns, as the country has fundamental economic problems, such as a high level of debt owed in foreign currencies that has grown in size as the lira has fallen.

And they say Erdogan remains unpredictable in his policies since he was re-elected this year as president with vastly expanded powers.

Erdogan has long been pressuring the central bank to keep interest rates low to encourage economic growth, even though that growth has encouraged reckless borrowing and caused consumer prices to spike higher. Economic growth slowed to an annual rate of 5.2 percent in the second quarter, from the first quarter’s 7.4 percent.

“The next thing to watch will be the reaction of President Erdogan,” said Jason Tuvey, senior emerging markets economist at Capital Economics. “Any sign that he will try to reassert his influence over monetary policy decisions could quickly cause market sentiment to deteriorate again.”

Just two hours before the central bank’s announcement, Erdogan repeated his belief that interest rates should be cut, calling them an “instrument for exploitation.”

“My sensitivities concerning interest rates are the same, nothing has changed,” Erdogan told a meeting of Turkish tradesmen and artisans in Ankara. “I’m saying: ‘Let’s cut these high interest rates.’”

While acknowledging that the central bank is independent, he also criticized it, saying it had consistently miscalculated inflation targets, and he portrayed the currency crisis as a foreign conspiracy.

In a bid to shore up the Turkish lira, Erdogan’s government issued a decree on Thursday banning the use of foreign currency in the sale and renting of property and the leasing of vehicles.

According to the decree, all sales and rental contracts agreed in foreign currency will be converted to Turkish lira.