With his fist raised in triumph, Azerbaijan’s defence minister put his arm around his Turkish counterpart, grinning while clad in military fatigues. “Commander-in-chief of the victorious army and defence minister of Azerbaijan’s closest ally!” read the caption of the official defence ministry photograph. It is a head-turning statement by the former Soviet state that has previously looked north to Russia as its most important partner. But a six-week-long conflict with Armenia over the disputed region of Nagorno-Karabakh that has resulted in major gains for Azerbaijan and its Turkish-backed military, has recalibrated Baku’s regional perspective.

A truce announced on Monday evening freezes the conflict and Azerbaijan’s territorial advances, and includes agreements that Armenia, a defence ally of Russia, must hand over additional land to its neighbour by the end of this month.

Armenia to hand back land under a ceasefire deal. While the truce was brokered by Moscow –  which has deployed peacekeepers

–  the scale of Azerbaijan’s success with Turkey’s support has cemented Ankara’s newfound influence in the Caucasus region, which the Kremlin views as its geopolitical back yard.

“The geopolitical consequences are disastrous not only for Armenia, but also for Russia,” said Ruslan Pukhov, director of Russian defence think-tank the Centre for Analysis of Strategies and Technologies. “The Russians’ client and ally was the loser. The Turkish ally won convincingly.”