One would have thought the brewing tensions in neighbouring Iran — an unravelling economy and the likelihood of an air strike by Israel– would only be a source of concern for Turkey. Every cloud, though….

Data released last week shows how the geo-political crisis has helped Turkey to shrink its massive current account deficit by a third this year. That’s because Iranians, scrambling to ditch their crumbling riyal currency and without access to dollars, have been buying up enormous amounts of gold as an inflation hedge, most of it from Turkey.

Turkey sold gold worth $6.2 billion to Iran in the January-July period this year, more than 10 times the $54 million that it exported to its neighbour in the same period in 2011. While sales to Iran officially dipped in August to $180 million from July’s $1.8 billion, that figure is deceptive as exports appear to have been routed through the UAE, according to Capital Economics.

The rumour initially was that Turkey was using gold to pay for Iranian crude, in a stroke dodging Western sanctions on Iranian exports as well as getting oil a bit cheaper. But that doesn’t wash any more, analysts at Capital Economics say, noting that Turkey’s gold exports now exceed total imports.

A year ago Turkey’s gold trade balance stood at minus $5.2 billion but that has swung into a $4 billion surplus, central bank data shows. In fact gold accounts for three-quarters of the rise in overall Turkish exports this year, analysts at Capital Economics point out, helping drive Turkey’s current account gap to 34-month lows in August.

Capital Economics reckons Turkey may be able to continue reaping the gold bonanza for a while yet. With the riyal at a record low to the dollar, inflation skyrocketing and sanctions likely to bring more hardship, Iranians are unlikely to halt their gold buying. Turkey can continue exporting gold from existing stockpiles for the next three years at least, Capital Economics says, calculating that the country holds some 1,400 tonnes of gold.

If exports continue at their current pace, Turkey’s 12-month gold trade surplus could rise to around $6 billion in the next six months (from $1.5 billion now) Capital Economics estimates. That would bring the current account deficit down to 7.5 percent of GDP, well off the 11 percent peak hit last year.

And if Turkish businesses can use gold payments to pay for Iranian imports, as is rumoured, it is not a bad deal for Iran either.