Turkey has secured a $15 billion investment from Qatar that could bolster its economy amid a widening dispute with the United States.

The pledge was announced Wednesday after a meeting between Qatar's Emir Tamim bin Hamad Al Thani and Turkish President Recep Tayyip Erdogan in Ankara. Qatari state media said the money would go toward economic projects, investments and deposits.

The Turkish lira extended its gains against the US dollar to 6% following the announcement, which came on the same day that Turkey announced steep tariff hikes on American products including cars, alcohol and tobacco.

The move is a response to trade actions announced last week by the Trump administration. It doubles retaliatory tariffs on American cars to 120% and on alcoholic drinks to 140%, according to a notice published by the Turkish government.

Other US products covered by the tariffs include fruit, coal, makeup and rice.

Relations between Washington and Ankara have rapidly soured in recent weeks over Turkey's detention of the American pastor Andrew Brunson.

The Trump administration announced plans last week to double US tariffs imports of steel and aluminum from Turkey. On Wednesday, a Turkish court rejected a second appeal to release Brunson.

Related: What happens next in Turkey? It probably won't be good

The political spat with Washington has added to pressure on the lira. Although the currency has strengthened in recent trading sessions, it is down more than 35% against the dollar this year.

Erdogan has accused the United States of stabbing Turkey in the back and on Tuesday called for a boycott of US electronics products.

In June, Turkey imposed a first wave of tariffs on US exports, worth a total of $1.8 billion, in retaliation for President Donald Trump's initial tariffs on steel and aluminum. The products targeted Wednesday are the same as in June.

The amount of products affected by the tariffs the two countries have imposed on one another are a relatively small part of the $19 billion of goods they traded last year, according to US data.

Qatar was among the handful of countries that analysts thought might lend Turkey a hand.

Erdogan spoke to Russian President Vladimir Putin on Friday, a conversation that included talk of deeper economic ties and mutually beneficial trade, according to Russian state media.

The diplomatic dispute with the United States is just one of the factors that have hammered the Turkish currency.

Investors have also been unnerved in recent weeks by a lack of action by the Turkish central bank, which shocked markets last month when it declined to hike interest rates in the face of rampant inflation.

Related: The threat Turkey's crisis poses to the world

Critics said the decision smacked of interference by Erdogan, who indicated during the recent presidential campaign that he wanted more control over central bank policy and described interest rates as "the mother and father of all evil."

Although Erdogan says he opposed interest rate hikes, he has not made a clear argument for why Turkey's central bank should keep rates low.

"There has been no sign whatsoever that the authorities are considering an orthodox response to the crisis, including tighter monetary and fiscal policy and measures to improve the central bank's credibility," said William Jackson, chief emerging markets economist at Capital Economics.

Jackson said the plunge in the lira was likely to push inflation above 20% and tip the Turkish economy into recession in the coming months. One dollar bought just seven lira at one point this week, compared with less than four at the start of the year.

"No matter how much money we make it finishes because the prices are going up. Fruit and vegetable prices are going up," said Sevim Pektas, a housewife, told CNN this week. "I do not understand how retired people or people earning minimum wage can afford their rent."

— Isil Sariyuce, Jomana Karadsheh and Gul Tuysuz contributed to this report.