With the presidential election in the United States only days away, Turkey is watching the vote closely. While Turkish President Recep Tayyip Erdogan enjoyed a close working relationship with Donald Trump when he was president, analysts warn that a second term for Trump wouldn't come without risks for Ankara.
Erdogan has avoided commenting on the US election, but Ankara sees the outcome of the 5 November vote as key for Turkish-US relations.
Each of the contenders, Vice-President Kamala Harris and Trump, are expected to take significantly different approaches to Turkey's long-time leader.
"During the past Trump presidency, the political relationship at the highest level between Erdogan and Trump was a strong one," says Sinan Ulgen, head of the Centre for Economics and Foreign Policy Studies, an Istanbul think tank.
Ties with President Joe Biden have been notably less friendly, however, if Harris were to win the relationship with Erdogan is likely to be a much more shallow one, Ulgen believes.
Face-to-face time
Erdogan met Trump nine times during his 2017-21 presidency, including on a state visit to Washington.
In contrast, he met Biden only briefly on the sidelines of international summits, with US-Turkish relations mainly conducted at foreign-minister level.
"Erdogan has been in power for more than 20 years and Biden is the only US president who has refused to meet him in an official capacity, either in the US capital or in the Turkish capital," says international relations professor Serhat Guvenc of Istanbul's Kadir Has University.
"For Erdogan, leader-to-leader talks are key to achieving his goals. And probably, he thinks deep down that he can sort out many things through personal contact, connections or personal engagement."
Such interaction, especially with the most powerful person in the world, is also seen as vital to Erdogan's status at home.
"It's very important for his domestic standing and legitimacy," says Asli Aydintasbas, a political commentator and visiting fellow at the Washington-based Brookings Institution.
"He has built a personalised system but also convinced voters, particularly his base, that he is a consequential leader, that Turkey is rising, that he is very important, he is on par with the US president and the Russian president, that everybody is looking up to Erdogan."
Turkey and Russia closer than ever despite Western sanctions
Lack of chemistry?
Aydintasbas questions how easy it would be for Erdogan to develop a relationship with Harris, even if she were ready to engage more directly than Biden.
"I cannot imagine what type of chemistry Harris and Erdogan would have. They don't come from similar backgrounds. It's difficult to imagine the two developing a very close personal relationship, to be honest," the analyst says.
Erdogan has often spoken warmly of his relationship with Trump – despite the fact he got hit by sanctions during his time in the White House over the detention of an American pastor, prompting the Turkish lira to crash in 2018.
Trump once even vowed to "totally destroy and obliterate" the Turkish economy over Turkey's threats to attack US-backed Syrian Kurdish forces.
"We have memories of the threats and sanctions," warns Murat Aslan of the pro-government Seta Foundation for Political, Economic and Social Research in Ankara.
Invoking the 2018 crisis, Aslan said: "Rather than words, I think deeds are important."
Erdogan hopes a U-turn can salvage Turkey's floundering economy
High-risk candidate
The Middle East is another potential sticking point.
Trump is calling for more support for Israel in its wars against Hamas and Hezbollah, and analysts say differences could again emerge between the US and Turkish leaders.
"Trump's approach to the Middle East and the conflict between the Palestinians and Israel could actually escalate the tension in the Middle East to the extent that a regional war could be unavoidable," warns Ozgur Unluhisarcikli, who directs the German Marshall Fund's office in Ankara.
"So yes, a Trump presidency has many opportunities for Turkey – but at a very high risk."
Meanwhile, though there has been little direct contact between Biden and Erdogan, Turkish-US relations have shown signs of improvement in recent months.
With the two Nato allies increasingly cooperating and better managing their differences, Aydintasbas suggests, there are merits for Ankara to both candidates.
"A Kamala Harris administration would mean more continuity, but the promise of stability in Turkish-US relations," she says. "Whereas Trump is so unpredictable that it could be very good one day, very bad one day."
With the Middle East war continuing to rage, Trump's unpredictability remains a risk to Ankara – but Erdogan will likely still covet the opportunity to renew his relationship with the US strongman.