Turkish President Recep Tayyip Erdogan's visit to Qatar has been something of an inevitability. The only surprise is that he left it so long.

Having taken Turkey on a journey of diminishing friendships and overstretched ambitions, Mr Erdogan is in desperate battle to stop the economy falling into a tailspin.

While the purpose of the visit was a military partnership, it was really dollar signs on the minds of the Turkish leadership.

The $5 billion (Dh18.3bn) currency swaps deposited by the Qataris into the Turkish central bank will bring Mr Erdogan some respite from the markets.

In the two years since the president's son-in-law Berat Albayrak was appointed Treasury Secretary, Turkey’s already troubled economy has faltered badly. Mr Albayrak's name has become a byword for corruption.

Mr Erdogan has sought to cajole Turks not to turn their savings into dollars.

"Let us show our nationalism," he said before departing for Qatar. “"Let us not use dollars. Let's turn to Turkish lira."

A bailout from Qatar, in dollars, allows the central bank to accept more deposits and thus provides stability for the economy.

It is likely to do little to address the endemic flaws in the economy. A rise in taxes on high-value property, digital services and hotels shook investor confidence.

After the head of the official statistics department was sacked, few believe Turkey’s inflation numbers any longer.

A dip under 10 per cent in rate of price increases was widely mocked last month. Almost everyone believes the increases are deep into double digits.

The Turkish economy is trapped in a familiar spiral of high debt and soaring prices. Mr Erdogan’s Anatolian miracle economy has become a mirage.

Some of the damage is self-inflicted. By buying the S400 Russian-made air defence system the country lost $12 billion contracts in the US F-35 fighter jet programme.

The supremacy of politics over economics under Mr Erdogan makes it difficult to see where a recovery starts.

By tilting ever closer to an axis involving Qatar, Iran and Russia, Mr Erdogan expects short-term support. How that staves off disaster in the long run is less easy to discern.