WASHINGTON (TNS) — President Donald Trump told Turkish President Recep Tayyip Erdogan that the U.S. would stop arming Kurdish fighters in Syria, Turkey's foreign minister said Friday, ending a policy that had inflamed tensions between the two nations.

Trump and Erdogan spoke by telephone following a summit on Syria that took place earlier this week in Sochi, Russia, between Erdogan, Russian President Vladimir Putin and Iranian President Hassan Rouhani. The gathering focused on discussions for a Syria peace settlement. Putin's plan, which largely excludes the U.S., got a boost on Friday when Syria's opposition agreed to form a single bloc to negotiate with President Bashar Assad.

Turkish Foreign Minister Mevlut Cavusoglu said in a news conference that Trump said weapons would no longer be given to the Kurdish group, known as the YPG. Cavusoglu said that Trump called the arming of the YPG ridiculous. The White House had no immediate comment on details of the Trump-Erdogan call.

The Kurds received U.S. backing as the most effective local proxies against Islamic State in Syria. But the policy of arming them, which began under former President Barack Obama, has been a point of tension with America's NATO ally.

Turkey considers the YPG a terrorist organization because of its link to Kurdish rebels in Turkey, and has been requesting that the U.S. take the weapons back now that the fight against Islamic State is winding down. Erdogan has also threatened military action against the Syrian Kurds, who control about a fifth of the war-ravaged country's territory.

Defense Secretary James Mattis said last week that American forces will maintain a presence in Syria even as the jihadist threat diminishes. "We're not going to just walk away right now," he said, citing the need to ensure progress toward a viable peace. The Russia-Iran-Turkey bloc has called for U.S. troops to go home.

Trump spoke with Putin earlier this week to discuss the situation in Syria, shortly after Putin met with Assad in Sochi. Russia and Iran are Assad's main allies, while Turkey has backed armed groups seeking to overthrow him. The three powers, who've joined forces in cease-fire efforts in Syria, are the dominant players now, though differences remain between them.

While the Obama administration had demanded the Syrian leader step down, Trump now says Assad's departure isn't a precondition for peace talks, even if it sees no political future for him.

"Will be speaking to President Recep Tayyip Erdogan of Turkey this morning about bringing peace to the mess that I inherited in the Middle East," Trump said on Twitter before the call. "I will get it all done, but what a mistake, in lives and dollars (6 trillion), to be there in the first place!"