Turkish President Recep Tayyip Erdogan told President Trump on Tuesday that the United States' decision to back Syrian Kurds in the fight against the Islamic State in Syria "will never be accepted," during a joint press conference in which the two leaders otherwise lavished praise on each other.

The underlying dispute comes from Trump's recent decision to arms the Kurds in Syria, and Erdogan couldn't resist bringing it up even as he thanked Trump, who he called "my dear friend," profusely for the White House invitation.

"I believe my current official visit to the United States will mark a historical turn of tide," Erdogan said through a translator. "I hope and pray that this new administration will bring forth auspicious results for the relations."

Erdogan then pivoted to Turkey's long-standing objection to U.S. plans to arm members of the Kurdish YPG militia, who Turkey considers terrorists, to fight ISIS in Syria.

"We are committed to fighting all forms of terrorism, without any discrimination whatsoever, that impose a clear and a present threat upon our future," Erdogan said. "Taking the YPG … into consideration in the region will never be accepted and it is going to be against a global agreement that we have reached."

Trump made no mention of Erdogan's complaints about the U.S. arming the Syrian Kurds, which Turkey insists are linked to a Turkish Kurdish group, known as the PKK, which the U.S., the European Union and Turkey all consider a terrorist organization.

The U.S. military says the Syrian Kurds are the most battle-tested and combat-ready fighters and among the only troops that can liberate the ISIS stronghold of Raqqa over the next few months.

The tensions came to the boiling point last month, when Turkish warplanes bombed U.S.-backed Kurdish fighters in both Syria and Iraq, in one case with American forces only about six miles away, and Erdogan has not ruled out attacking Syrian Kurdish fighters again.

Trump mentioned none of that in his warm welcoming remarks for Erdogan.

"We support Turkey in the first fight against Turkey and terror groups like ISIS and the PKK, and ensure they have no safe quarter, the terror groups," Trump said.

"We're going to have a lot of great success over the next coming years. And we want to get as many to help fight terrorism as possible, and that's one of the beautiful things that's happening with Turkey," Trump said. "The relationship that we have together will be unbeatable."