Why Erdogan's victory matters for the West
You can spot Turkey's global strategic significance - which has starkly increased against the backdrop of the Ukraine war - by the A-list potpourri of world leaders who rushed to congratulate Recep Tayyip Erdogan on his election win on Sunday night.
First out of the box was Russian President Vladimir Putin.
He was so keen to stroke the ego of his Turkish counterpart and fellow "strongman" leader that he didn't even wait for the official results of the vote before singling out Mr Erdogan's "independent foreign policy" as a reason for his victory.
We can safely assume the Turkish policy that Russia is particularly fond of is Mr Erdogan's refusal to ostracise the Kremlin after its full-scale invasion of Ukraine, even as Turkey's allies in Nato imposed sanctions and slashed their energy reliance on Russia.
Trade between Turkey and Russia even increased significantly since the start of the war in Ukraine.
But also hot on Mr Putin's congratulatory heels on Sunday were US President Joe Biden and his French counterpart Emmanuel Macron.
Despite their dislike of Mr Erdogan's cosying up to the Kremlin and his slashing of free speech and democratic norms at home during his first two decades in power, to them Turkey is a crucial - if difficult and unpredictable - ally of the West.
Turkey is a key member of the Nato military alliance, taking part in all its missions.
Mr Erdogan may maintain close ties with Russia - but he also provides military aid to Ukraine.
He famously brokered a deal whereby Russia ended a blockade on Ukraine grain supplies, allowing them to flow to parts of the world that rely on them. He also - after long hesitation - gave his official approval to Russia's neighbour Finland joining Nato.
Once a passionate advocate of Turkey joining the EU, Mr Erdogan these days speaks of "making Turkey great again".
For him, that has entailed having a more independent foreign policy. Over the years, he's developed highly transactional relationships with all his allies.
The White House has made no secret of its impatience to try to persuade Mr Erdogan to approve Nato membership for Sweden too.
Sweden would provide important Baltic Sea cover for the alliance against Russia.
The West hopes the dire state of Turkey's economy - and the likelihood that Mr Erdogan will have to concentrate on stabilising finances and attracting foreign investment - could prove a soft spot to push for Sweden's Nato accession as a quid pro quo.
Turkey and Hungary are the only Nato countries still blocking Stockholm's membership.
President Macron, meanwhile, worries about migration to the EU and hopes to win assurances from President Erdogan as soon as possible.
During the migration crisis of 2015 more than a million refugees and asylum seekers - mainly from Syria - made the perilous journey across the Mediterranean to the EU in people-smugglers' boats.
Brussels subsequently made a deal with Turkey. In exchange for a large sum of money and visa-free travel for Turks into the EU - the latter never fully arrived because of EU objections to Mr Erdogan's jailing of critics and political opponents - the Turkish president would do his best to prevent migrants without papers leaving Turkish waters to reach the bloc.
But swelling numbers of Syrian refugees at home proved extremely unpopular with Turkish voters.
This month, every political party running in Turkey's parliamentary elections promised to take action to solve "the migrant issue".
The EU frets about the prospect of refugees being pushed back by Turkey into Syria at risk to their safety - and of Turkey allowing people smugglers free rein again to send boats of asylum seekers and other migrants over the Mediterranean.
Brussels is also on the defensive as EU member Greece is involved in a number of disputes with Mr Erdogan centred on the Aegean Sea, while EU member Cyprus is still seething after Mr Erdogan called for a two-state solution (Greek and Turkish) to decades-long divisions there following a Turkish invasion nearly 50 years ago.
The West used to describe Turkey's strategic importance as the bridge between Europe and the Middle East - but Russia's invasion of Ukraine has transformed Turkey's status.
Few expect big foreign policy surprises from Mr Erdogan as he enters his third decade in power. But Ankara's strategic allies are watching very closely indeed.
What Turkey does matters.