(Bloomberg) — Days after handing Turkish President Recep Tayyip Erdogan a diplomatic win by announcing he’ll pull U.S. troops out of Syria, President Donald Trump defended the move, saying Turkey “should be able to easily take care of whatever remains” of Islamic State.

Trump’s action on Syria, which was announced on Twitter and triggered the resignation of Defense Secretary Jim Mattis and a leading U.S. diplomat, came a week after the president was supposed to tell his Turkish counterpart to stop testing his patience with military threats in Syria.

Instead, during a lengthy phone call on Dec. 14, Trump shocked even those in his inner circle by yielding to a suggestion from Erdogan to reverse the Pentagon’s Syrian strategy.

Erdogan pressed Trump to explain why American forces were still in Syria even after they met their objective of defeating Islamic State, according to people with direct knowledge of the conversation.

Facing criticism from Republican allies and others, Trump fired back on Saturday, saying that “ISIS is largely defeated.” That was a tweak from his Dec. 19 assertion that “we have defeated ISIS in Syria.”

During the mid-month phone call Trump said Erdogan had a point about the defeat of ISIS, repeating his long-held conviction that American troops should be out of Syria anyway, according to the people, including an American official who spoke on condition of anonymity while discussing the call.

Then the American president dropped a bombshell, asking National Security Adviser John Bolton — whom he addressed as “Johnny” — about the feasibility of an immediate pullout, according to two of the people. He got a reassuring “yes” in response and the ball started rolling, the people said.

Days later, Trump announced the pullout of all 2,000 U.S. troops in Syria, facing withering criticism from both sides of the political spectrum for leaving a key part of the Middle East exposed to Russian and Iranian influence.

While Trump faced political heat, Erdogan became a hero at home, seen as a leader who got his way with the world’s biggest superpower by convincing Washington to end its support for Turkey’s nemesis in Syria, a Kurdish militant group called the YPG. Erdogan says the group — which has allied with America for some of the toughest fighting in northern Syria — is linked to domestic terrorists he has long sought to wipe out.

The developments illustrate how Erdogan has managed to become a more central player in both Mideast politics and U.S. foreign policy, capitalizing on an American president eager to fulfill promises to extricate American troops from Middle East quagmires. They come just months after Trump and Erdogan were facing off over new American tariffs, Turkey’s refusal to release an American pastor and Erdogan’s demands that the U.S. extradite a cleric it views as behind a failed 2016 coup.

NSC Denial

National Security Council spokesman Garrett Marquis rejected characterizations of the Trump-Erdogan call, calling it a “false version of events.” The White House several months ago stopped routinely giving readouts of Trump’s calls with foreign leaders.

Erdogan had already accumulated some diplomatic capital with the way he handled leaks about the October killing of Washington Post columnist Jamal Khashoggi by a team of Saudi Arabian officials at the Kingdom’s consulate in Istanbul.

Turkey sent a steady trickle of news to Turkish and U.S. media outlets in order to put some distance between the Trump administration and Erdogan rival Saudi Crown Prince Mohammed Bin Salman, while carefully refraining from disclosing anything that could embarrass the Americans.

But for Erdogan to maintain that diplomatic momentum and expand his regional clout, he will need more than just the Khashoggi affair or the American troop pullout, according to Alpaslan Ozerdem, a co-director of Center for Trust, Peace and Social Relations at Coventry University in the UK.

‘Ambitious Leader’

“Erdogan is an ambitious leader. He may see the U.S. troop withdrawal from Syria as an opportunity that could help him resurrect his goal of becoming a world leader by taking a position against the biggest threat to the U.S and Israel in the Middle East — Iran,” he said.

Turkey sees no ground force in Syria capable of taking out the Iranian forces supporting the regime of President Bashar al-Assad — an insight into Syria’s eight-year-long civil war that Turkish diplomats have repeatedly relayed to U.S. colleagues. The U.S. position that American troops needed to stay in Syria to counter Iran’s presence was wiped away by Trump’s withdrawal announcement.

With the U.S. departing, Moscow, Ankara and Tehran are even more in control of Syria’s future. They’ve already been dominating talks over Syria through a trilateral mechanism that pointedly kept Washington on the sidelines.

But behind the scenes, there is a deep distrust in Ankara toward both Iran and Russia. One possibility Turkish officials fear is that the Syrian regime, backed by Russia and Iran, might collaborate with the Kurdish YPG after the U.S. pullout.

Erdogan “is well aware that there is a bigger piece at stake in Syria beyond fighting the Kurdish group YPG. For that, Turkey has to work together with the U.S. against Iran,” Ozerdem said.

Brett McGurk, the U.S. envoy to the global coalition fighting Islamic State, followed Mattis in resigning after Trump’s move to withdraw troops, the Associated Press reported on Saturday, citing a U.S. official it didn’t identify.

Earlier this month McGurk, a holdover from the Obama administration, said it would be “reckless” to consider that ISIS had been defeated. McGurk brought forward his original plan to leave his post in mid-February, the AP reported.

Get The Brief. Sign up to receive the top stories you need to know right now. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Contact us at letters@time.com.