WASHINGTON/ANKARA (Reuters) - 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 U.S. 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 United States have not completely collapsed, having soured severely over their disagreements on a host of issues.

“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 U.S.-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 toward the U.S. 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 U.S. presence there. Months earlier, the United States was livid over Turkey’s purchase of Russian missile defense systems.

Turkey shrugged off threats of U.S. sanctions and began receiving its first S-400 deliveries in July. In response, Washington removed Turkey from the F-35 fighter jet program, in which Ankara was a manufacturer and buyer. But so far, it has not imposed any sanctions.

The move infuriated the U.S. 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 Islamic State.

FILE PHOTO: Turkey's President Tayyip Erdogan shakes hands with U.S. President Donald Trump during their bilateral meeting on the sidelines of the G20 leaders summit in Osaka, Japan, June 29, 2019. Murat Cetinmuhurdar/Turkish Presidential Press Office/Handout via REUTERS/File Photo

The U.S. 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 favor of a non-binding resolution recognizing 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 U.S. consular workers prosecuted in Turkey.

For Ankara, its long-standing extradition request for U.S.-based Islamic cleric Fethullah Gulen, whom it blames for orchestrating the 2016 failed coup, and U.S. charges on Turkey’s state-owned Halkbank for Iran sanctions-busting are also contentious.

“We are of the same opinion with President Trump to solve problems and to improve our relations despite clouds in our bilateral ties,” Erdogan told reporters before his flight to Washington. “We have made significant progress on several issues despite bureaucratic and political sabotage attempts by some remnants of the previous administration.”

Erdogan’s communications director Fahrettin Altun later tweeted that the United States should stop its support for the Kurdish YPG militia. But a senior U.S. administration official signaled the partnership is there to stay. “There is no intention for that cooperation to end,” the official told reporters on a conference call.

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 program 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.

“U.S. soldiers remaining at oil fields in Syria are also against the spirit of what is being done in Syria,” the 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 added.