WASHINGTON — American forces in northeastern Syria received an urgent, unexpected alert early Monday morning to pull back from their posts.

"We're departing the field," the messages said, according to current and former senior U.S. defense officials.

At 3 a.m. local time, the commander of the Syrian Democratic Forces, Gen. Mazloum Kobani, also received a phone call from a senior U.S. official telling him to get on a video teleconference with an American military commander who informed him President Donald Trump had ordered U.S. troops to withdraw.

"This decision, this is something we don't expect at all," Kobani said during an interview with NBC News on Monday afternoon.

Confusion ensued in Syria and Washington in the hours after Trump agreed during a phone call with Turkish President Recep Tayyip Erdogan to move U.S. troops out of northeastern Syria to clear the way for a Turkish military operation in the area. According to multiple current and former U.S. officials, the White House's announcement of the decision late Sunday night blindsided not just America's Kurdish partners in the fight against the Islamic State militant group, or ISIS, in Syria, but almost everyone — senior officials at the Pentagon, the State Department and the White House, lawmakers on Capitol Hill, and U.S. allies in Europe and the Middle East.

A U.S. soldier stands guard during a joint patrol with Turkish troops in the Syrian village of al-Hashisha along the border with Turkey, on Sept. 8, 2019. Delil Souleiman / AFP - Getty Images file

Sunday's phone call between Trump and Erdogan was held to try to ease the Turkish leader's fury that he didn't get a one-on-one meeting with Trump last month on the sidelines of the United Nations General Assembly, according to three current and former officials. Erdogan made it known to U.S. officials that he was not happy his only interaction with Trump during the gathering of world leaders in New York was at a large reception, according to the officials. One senior administration official said Trump's schedule during the U.N. General Assembly — which included a dozen one-on-one meetings with world leaders — did not allow time for a meeting with Erdogan.

But Erdogan had wanted to meet with Trump to discuss a safe zone in northern Syria, for which the U.S. expressed support, and potentially purchasing a U.S. missile defense system, according to the officials.

The U.S. and Turkey have been at odds over Erdogan's purchase of a Russian missile defense system, though Trump has refused to adopt sanctions against Ankara in response despite pressure from his own aides and members of Congress to do so.

Turkey has long threatened to launch a military offensive in northeastern Syria, home to Kurdish forces who work closely with the U.S. but whom Erdogan views as terrorists. Turkey's planning for an operation into Syria ramped up significantly in the weeks since the U.N. summit, the current and former officials said.

"He was really slighted," one former U.S. official said of Erdogan's reaction to not meeting with Trump during the U.N. summit. "So Trump tried to smooth it over."

But Sunday's phone call didn't go as expected, officials said. Erdogan was adamant about Turkey going into Syria, officials said. Even Trump's offer of a White House visit wasn't enough to deter him.

Trump told Erdogan that a moderate incursion, such as clearing out a safe zone, would be acceptable, officials said. But he said a large invasion that leads to major combat operations would be unacceptable, officials said.

If Turkey did launch a large military operation, Trump warned Erdogan, the U.S. would completely withdraw from Syria, according to one senior U.S. official.

Immediately after the phone call, acting White House chief of staff Mick Mulvaney called Defense Secretary Mark Esper to inform him of the president's decision, one former and one current U.S. official said.

"Turkey will soon be moving forward with its long-planned operation into Northern Syria," White House press secretary Stephanie Grisham said in a statement Sunday night. U.S. forces "will not support or be involved in the operation" and "will no longer be in the immediate area," she said.

U.S. and Turkish military forces conduct a joint ground patrol inside the security mechanism area in northeast, Syria, on Sept. 8, 2019. Spc. Alec Dionne / U.S. ARMY via Reuters file

The statement was the first time many in the administration, Congress and capitals across the world learned of the president's decision. Kurdish forces working with the U.S. in Syria said the president's announcement was a betrayal. Administration officials, and the president, on Monday appeared to try to contain the fallout amid withering criticism from Republicans and Democrats.

"We do not support [the Turkish] operation in any way, shape or form, everybody from the president on down, was working on the safe zone implementation," a senior State Department official told reporters Monday. "The president made it very clear that we would not support this operation in any way, shape, or form."

The official said several dozen of the roughly 1,000 American troops in Syria have pulled back from their positions in northeast Syria, and that the U.S. has suspended work to implement a safe zone.

The Pentagon also made its opposition to the Turkish plans known.

"The Department of Defense made clear to Turkey — as did the President — that we do not endorse a Turkish operation in Northern Syria. The U.S. Armed Forces will not support, or be involved in any such operation," Assistant to the Secretary of Defense for Public Affairs Jonathan Hoffman said in a statement Monday.

European officials, who were caught off guard by the president's announcement, are weighing options for addressing Trump's criticism of their handling of the many foreign fighters from their countries who've been detained in Syria. Grisham's statement Sunday night said Turkey would now be responsible for those captured ISIS fighters, shifting control from the Syrian Defense Forces aligned with the U.S.

Turkish President Tayyip Erdogan attends a joint press conference with Serbia's President Aleksandar Vucic after their meeting in Belgrade, Serbia, on Oct. 7, 2019. Djordje Kojadinovic / Reuters

"The United States Government has pressed France, Germany, and other European nations, from which many captured ISIS fighters came, to take them back, but they did not want them and refused," Grisham said. "The United States will not hold them for what could be many years and great cost to the United States taxpayer."

Trump, meanwhile seemed to back away from his initial statement suggesting the U.S. would leave Syria and would not get in the way of a Turkish military incursion there.

He wrote on Twitter on Monday that "it is time for us to get out of these ridiculous Endless Wars."

But later, after an onslaught of Republican criticism, Trump struck a different tone toward Turkey on Twitter: "As I have stated strongly before, and just to reiterate, if Turkey does anything that I, in my great and unmatched wisdom, consider to be off limits, I will totally destroy and obliterate the Economy of Turkey (I've done before!)."

"Even Trump is starting to realize that maybe he didn't handle this too well, and is maybe trying to walk it back," the official said. "I think you're going to see some backpedaling."

Last December, when Trump abruptly announced he was withdrawing all U.S. troops from Syria, then-Defense Secretary Jim Mattis quit and other senior members of the president's national security team convinced him to reverse the policy. Some of those officials, including former national security adviser John Bolton and the former Chairman of the Joint Chiefs of Staff Gen. Joseph Dunford, recently departed the administration.

It's unclear if anyone inside the administration pushed back on the president's Sunday decision about Syria.

Secretary of State Mike Pompeo was on the call with Erdogan, a State Department official said. The official didn't characterize his views, but Pompeo had opposed the president's previous move to withdraw all U.S. forces from northern Syria and hand over control to Erdogan.

One senior administration official said Trump pushed back "very hard" during the phone call against the idea of a Turkish military operation and told Erdogan that they should let their militaries handle it together because the safe zone arrangement was working. But Erdogan persisted.

Eventually, Trump told Erdogan something to the effect of, "If you're going to do it, you're going to get no support," according to the official.

The official said the intention of Grisham's Sunday night statement was to convey that because Turkey has decided to conduct a military operation despite Trump's argument against it, the U.S. is not going to support it but will pull back American troops so they aren't caught in the middle of it.

A spokesperson for the National Security Council did not respond to a request for comment.