WASHINGTON — Brett McGurk, the U.S. envoy to the global coalition fighting the Islamic State group, has resigned in protest over President Donald Trump’s abrupt decision to withdraw U.S. troops from Syria, a U.S. official said, joining Defense Secretary Jim Mattis in an administration exodus of experienced national security figures.

Only 11 days ago, McGurk had said it would be "reckless" to consider IS defeated and therefore would be unwise to bring American forces home. McGurk decided to speed up his original plan to leave his post in mid-February.

Appointed to the post by President Barack Obama in 2015 and retained by Trump, McGurk said in his resignation letter that the militants were on the run, but not yet defeated, and that the premature pullout of American forces from Syria would create the conditions that gave rise to IS. He also cited gains in accelerating the campaign against IS, but that the work was not yet done.

His letter, submitted Friday to Secretary of State Mike Pompeo, was described to The Associated Press on Saturday by an official familiar with its contents. The official was not authorized to publicly discuss the matter before the letter was released and spoke on condition of anonymity.

Trump played down the development, tweeting Saturday night that "I do not know" the envoy and it's a "nothing event." He noted McGurk planned to leave soon anyway and added: "Grandstander?"

Soldiers in the Syrian Democratic Forces gather for breakfast at a battle position in Deir ez-Zor province, Syria, on Nov. 25. (Sgt. Matthew Crane/Army)
Soldiers in the Syrian Democratic Forces gather for breakfast at a battle position in Deir ez-Zor province, Syria, on Nov. 25. (Sgt. Matthew Crane/Army)

Shortly after news of McGurk’s resignation broke, Trump again defended his decision to pull all of the roughly 2,000 U.S. forces from Syria in the coming weeks.

"We were originally going to be there for three months, and that was seven years ago - we never left," Trump tweeted. "When I became President, ISIS was going wild. Now ISIS is largely defeated and other local countries, including Turkey, should be able to easily take care of whatever remains. We're coming home!"

Although the civil war in Syria has gone on since 2011, the U.S. did not begin launching airstrikes against IS until September 2014, and American troops did not go into Syria until 2015.

McGurk, whose resignation is effective Dec. 31, was planning to leave the job in mid-February after a U.S.-hosted meeting of foreign ministers from the coalition countries, but he felt he could continue no longer after Trump's decision to withdraw from Syria and Mattis' resignation, according to the official.

Trump declaration of a victory over IS has been roundly contradicted by his own experts' assessments, and his decision to pull troops out was widely denounced by members of Congress, who called his action rash and dangerous.

Brett McGurk, Special Presidential Envoy for the Global Coalition to Defeat ISIS, alongside U.S. Army Maj. Gen. James B. Jarrard, Commanding General of Special Operations Joint Task Force-Operation Inherent Resolve, speaks with Leila Mustafa, co-president of the Raqqah Civil Council, during his July 10 visit to Raqqah, Syria. McGurk’s visit included a meeting with the RCC and a tour of critical infrastructure the council is diligently working to bring back to full capacity. The RCC highlighted the status of their current projects and presented opportunities for future stability. (Sgt. Brigitte Morgan/Army)
Brett McGurk, Special Presidential Envoy for the Global Coalition to Defeat ISIS, alongside U.S. Army Maj. Gen. James B. Jarrard, Commanding General of Special Operations Joint Task Force-Operation Inherent Resolve, speaks with Leila Mustafa, co-president of the Raqqah Civil Council, during his July 10 visit to Raqqah, Syria. McGurk’s visit included a meeting with the RCC and a tour of critical infrastructure the council is diligently working to bring back to full capacity. The RCC highlighted the status of their current projects and presented opportunities for future stability. (Sgt. Brigitte Morgan/Army)

Mattis, perhaps the most respected foreign policy official in the administration, announced on Thursday that he will leave by the end of February. He told Trump in a letter that he was departing because “you have a right to have a Secretary of Defense whose views are better aligned with yours.”

The withdrawal decision will fulfill Trump's goal of bringing troops home from Syria, but military leaders have pushed back for months, arguing that the IS group remains a threat and could regroup in Syria's long-running civil war. U.S. policy has been to keep troops in place until the extremists are eradicated.

Among officials' key concerns is that a U.S. pullout will leave U.S.-backed Syrian Democratic Forces vulnerable to attacks by Turkey, the Syrian government and remaining IS fighters. The SDF, a Kurdish-led force, is America’s only military partner in Syria.

A second official said McGurk on Friday was pushing for the U.S. to allow the SDF to reach out to troops allied with Syrian President Bashar Assad's government for protection. McGurk argued that America had a moral obligation to help prevent the allied fighters from being slaughtered by Turkey, which considers the SDF an enemy.

McGurk said at a State Department briefing on Dec. 11 that "it would be reckless if we were just to say, 'Well, the physical caliphate is defeated, so we can just leave now.' I think anyone who's looked at a conflict like this would agree with that."

A week before that, Gen. Joseph Dunford, chairman of the Joint Chiefs of Staff, said the U.S. had a long way to go in training local Syrian forces to prevent a resurgence of IS and stabilize Syria. He said it would take 35,000 to 40,000 local troops in northeastern Syria to maintain security over the long term, but only about 20 percent of that number had been trained.

McGurk, 45, previously served as a deputy assistant secretary of state for Iraq and Iran, and during the negotiations for the landmark Iran nuclear deal by the Obama administration, led secret side talks with Tehran on the release of Americans imprisoned there.

McGurk, was briefly considered for the post of ambassador to Iraq after having served as a senior official covering Iraq and Afghanistan during President George W. Bush's administration.

A former Supreme Court law clerk to the late Chief Justice William Rehnquist, McGurk worked as a lawyer for the Coalition Provisional Authority in Iraq after the 2003 U.S.-led invasion and joined Bush's National Security Council staff, where in 2007 and 2008, he was the lead U.S. negotiator on security agreements with Iraq.

Taking over for now for McGurk will be his deputy, retired Lt. Gen. Terry Wolff, who served three tours of active duty in Iraq.

Jim Jeffrey, a veteran diplomat who was appointed special representative for Syria engagement in August, is expected to stay in his position, officials said.

IS militants still hold a string of villages and towns along the Euphrates River in eastern Syria, where they have resisted weeks of attacks by the U.S.-supported Syrian Democratic Forces to drive them out. The pocket is home to about 15,000 people, among them 2,000 IS fighters, according to U.S. military estimates.

But that figure could be as high as 8,000 militants, if fighters hiding out in the deserts south of the Euphrates River are also counted, according to according to the Syrian Observatory for Human Rights, which monitors the conflict through networks of local informants. Military officials have also made it clear that IS fighters fleeing Euphrates River region have found refuge in other areas of the country, fueling concerns that they could regroup and rise again.

The SDF said Thursday: "The war against Islamic State has not ended and the group has not been defeated."

Associated Press writer Susannah George contributed to this report.