At the 2012 opening of Trump Towers in Istanbul, real estate mogul Donald Trump sang the praises of Tayyip Erdogan, telling a mostly Turkish audience that their leader, prime minister at the time, was “highly respected” around the world.
"He's a good man. He's just representing you very well," Trump said at the ceremony.
Since becoming the United States president, Trump has openly complimented Erdogan and his combative ruling style, calling him "a friend" and "hell of a leader". Such fondness from Trump for the Turkish president, who is due to meet with him at the White House on Wednesday, is seen by many as the only reason why relations between Turkey and the US have not completely collapsed, having soured severely over their disagreements on a host of issues.
Read: A US trade war with Turkey over a little known pastor? Don’t believe a word of it
"The two leaders have an affinity for each other as strongman presidents," said Soner Cagaptay, director of the Turkish Research Program at The Washington Institute for Near East Policy, while warning of the deep animosity within the bureaucracies of the two Nato allies.
"The Erdogan-Trump part of the US-Turkey relationship is really the only component of it that is currently working right now," Cagaptay said. "Confidence between government agencies of both countries has eroded and there is considerable anger towards the US in Turkey and vice versa."
Washington and Ankara hit a new crisis point last month over Syria, after Erdogan began a cross-border incursion against America's Kurdish allies and upended the US presence there. Months earlier, the US was livid over Turkey's purchase of Russian missile defence systems.
Turkey shrugged off threats of US sanctions and began receiving its first S-400 deliveries in July. In response, Washington removed Turkey from the F-35 fighter jet programme, in which Ankara was a manufacturer and buyer. But so far, it has not imposed any sanctions.
The move infuriated the US Congress, whose anger toward Turkey deepened following Ankara's offensive into Syria to drive out the Kurdish militia, Washington's main partner in the fight against the militant Islamic State group.
The US House of Representatives last month passed a sanctions package to punish Turkey over its Syria operation while key members of the Senate, including Trump ally Lindsey Graham, have vowed to advance it if Ankara endangers Kurds.
The House has also voted in favour of a non-binding resolution recognising as genocide the deaths of 1.5 million Armenians 100 years ago, for the first time, angering Ankara. Some lawmakers on Monday asked Trump in a letter to rescind the invitation to Erdogan.
Erdogan has managed to avoid sanctions so far, but on Sunday, White House national security adviser Robert O'Brien said the threat was real.
"If Turkey doesn't get rid of the S-400, I mean, there will likely be sanctions. [...] Turkey will feel the impact of those sanctions," he told CBS News.
Washington wants S-400s abandoned
The issues straining the Nato allies stretch well beyond Syria and Russia. While Washington has largely stayed quiet in the face of an increasingly authoritarian Erdogan, it wants Ankara to drop charges against US consular workers prosecuted in Turkey.
For Ankara, its long-standing extradition request for US-based Islamic cleric Fethullah Gulen, who it blames for orchestrating the 2016 failed coup, and US charges on Turkey's state-owned Halkbank for Iran sanctions-busting are also contentious.
For Wednesday, the Trump administration's main goals are to get Erdogan to drop plans to use the S-400s and to agree to a permanent ceasefire in Syria, a senior administration official said.
"We want to lock that in," the official said, referring to both issues.
If Turkey agrees, Washington could eventually allow Ankara back on the F-35 fighter jet programme and offer to sign a $100 billion trade agreement, two U.S. officials said. But Ankara has yet to signal a reversal.
"Something like Turkey taking a step back from its purchase of S-400s is not on the agenda," a senior Turkish official said.
Since his announcement last December to pull out all troops from Syria, Trump has softened plans and agreed to keep a residual force in the northeastern part of the country. As part of that plan, Washington wants to continue working with SDF fighters in the region to press on Islamic State, a move Ankara dislikes.
"US soldiers remaining at oil fields in Syria are also against the spirit of what is being done in Syria," a senior Turkish official said.
"The support the United States provides the YPG is one of the biggest threats to ties between the two countries in the coming period. This will be underlined very seriously during the visit," he said.
Despite the disagreements, Ankara remains hopeful, citing a warm telephone conversation between the two leaders last week.
"With Trump's personal support, I believe the visit will contribute to overcoming problems. The phone call gave serious indications of this," the official said.