Turkey's central bank raised its interest rate to 24% from 17.75% on Thursday, beating market forecasts.

Earlier in the day, Turkish President Erdogan stoked fears that the central bank's independence could be under threat by calling for low interest rates.

The lira is surging against the dollar as a result, with a swing of 4% from negative to positive.

LONDON — The Turkish lira was surging against the dollar on Thursday after the country's central bank defied the wishes of the president and hiked interest rates.

The Central Bank of the Republic of Turkey raised its benchmark rate of interest to 24% from 17.75%. That beat the market consensus of a hike to 22% and calmed investor fears that the CBRT wouldn't raise rates at all.

Analysts have been calling for the central bank to raise rates by as much as 10 percentage points to combat runaway inflation in Turkey, which is running at about 18%.

Earlier in the day, Turkish President Recep Tayyip Erdogan said he believed Turkey should have low interest rates and called them a "tool of exploitation." Erdogan is ideologically opposed to interest rates and has called them "evil."

The lira has come under sustained pressure this summer, in part over fears that Erdogan is exerting greater influence over the CBRT, which is meant to be independent.

Erdogan's comments on Thursday sent the dollar spiking by as much as 3% against the lira. The CBRT's decision dramatically reversed this, however, with the dollar falling by as much as 5% against the lira at one point.

Here's how the dollar looked against the lira roughly 10 minutes after the CBRT's decision (remember that when the lira appreciates, the dollar falls):

Markets Insider

"This was a hike beyond what the market was thinking and in the context of the earlier comments from president Erdogan, is being treated warmly by markets," Neil Wilson, the chief market analyst at Markets.com, said in an email.

"It represents a major and important reassertion of the central bank's independence and shows they will not be bullied by politicians, although to a large degree its hand was forced by the 18% print on August inflation."

Turkish bonds also improved on the rates decision. The yield on 10-year bonds fell by 90 basis points to 19.28%.