ISTANBUL/WASHINGTON • Mr Donald Trump was supposed to tell his Turkish counterpart to stop testing his patience with military threats in Syria. That is, if the American President stuck to the script.
Instead, during a lengthy phone call earlier this month, Mr Trump shocked even those in his inner circle by yielding to a suggestion from Mr Recep Tayyip Erdogan to reverse the Pentagon's Syrian strategy, handing the Turkish President his biggest diplomatic victory ever.
Mr Erdogan pressed Mr Trump on the Dec 14 call to explain why American forces were still in Syria even after they had met their objective of defeating the Islamic State in Iraq and Syria (ISIS), according to people with direct knowledge of the conversation.
Mr Erdogan had a point about the defeat of ISIS, Mr Trump said, repeating his long-held conviction that US troops should be out of Syria anyway, according to the people, including a US 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.
Erdogan is an ambitious leader. He may see the US 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 US and Israel in the Middle East - Iran.
PROF ALPASLAN OZERDEM, a co-director of the Centre for Trust, Peace and Social Relations at Coventry University, on Mr Erdogan's next move.
Days later, Mr Trump announced the pullout of all 2,000 US troops from 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.
Then, on Thursday, Defence Secretary James Mattis resigned.
While Mr Trump faced political heat, Mr 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. Mr 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 Mr Erdogan has managed to become a more central player in both Middle East politics and US foreign policy, capitalising on an American president eager to fulfil promises to extricate American troops from Middle East quagmires.
They come just months after Mr Trump and Mr Erdogan were facing off over new American tariffs, Turkey's refusal to release an American pastor and Mr Erdogan's demands that the US extradite a cleric it views as behind a failed 2016 coup.
National Security Council spokesman Garrett Marquis rejected characterisations of the Trump-Erdogan call, calling them a "false version of events".
Mr 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 US media outlets in order to put some distance between the Trump administration and Erdogan rival and Saudi Crown Prince Mohammed bin Salman, while carefully refraining from disclosing anything that could embarrass the Americans.
But for Mr 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 Professor Alpaslan Ozerdem, a co-director of the Centre for Trust, Peace and Social Relations at Coventry University in Britain.
"Erdogan is an ambitious leader. He may see the US 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 US 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 US colleagues.
The US position that American troops needed to stay in Syria to counter Iran's presence was wiped away by Mr Trump's withdrawal announcement. With the US departing, Moscow, Ankara and Teheran are even more in control of Syria's future.