Secretary of State Mike Pompeo’s top deputy in the effort to defeat the Islamic State resigned in protest of the abrupt decision to withdraw from Syria, according to new reports.

Brett McGurk has served as the special envoy to the counter-ISIS coalition since 2015, when then-President Barack Obama appointed him to the role as the would-be caliphate rampaged across Iraq. President Trump’s administration kept him in the post, which took him to Syria about 20 times to coordinate with the factions fighting ISIS.

He said last week that it would be “reckless” for the United States to withdraw from Syria abruptly, not knowing that Trump was just days away from an unexpected and major policy shift.

“The military objective is the enduring defeat of ISIS,” McGurk told reporters at the State Department. “Areas that we have cleared of ISIS, they have not returned or actually seized physical space. There’s clandestine cells. Nobody is saying that they are going to disappear. Nobody is that naive. So we want to stay on the ground and make sure that stability can be maintained in these areas.”

Trump changed course just a few days later. "We have defeated ISIS in Syria, my only reason for being there during the Trump Presidency,” he tweeted Wednesday.

The news was a shock to his own administration, especially the mid-level State Department officials who work most closely on Syria issues. Deputy Assistant Secretary Joel Rayburn — who joined the Trump administration to work in the White House National Security Council before moving to the State Department — had to cancel a Wednesday morning briefing with the administration’s outside allies, a source familiar with the intended invent told the Washington Examiner, because the plans he’d expected to discuss were rendered obsolete.

Some U.S. allies participating in the counter-ISIS coalition also learned of the withdrawal from the tweet.

“Allies should be consulted in advance,” a diplomat from one of the coalition members told the Washington Examiner. “We were left blind on the decision.”

McGurk, in a move first reported by CBS, planned to leave in February, but will now resign effective Dec. 31.

“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,” according to the Associated Press. “McGurk also cited gains in accelerating the campaign against IS, but that the work was not yet done.”

McGurk’s emphasis on the potential for ISIS to return seemed tailored to Russian protests that the U.S. is being dishonest about claiming that intervention in Syria is a counter-terrorism operation. His remarks also established the legal basis for the operation, which is tied to congressional approval for military action against al-Qaeda and its affiliates. ISIS is an al Qaeda off-shoot.

“I think it’s fair to say Americans will remain on the ground after the physical defeat of the caliphate, until we have the pieces in place to ensure that that defeat is enduring,” he said in the Dec. 11 briefing. “So obviously, 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.”

McGurk was one of the top U.S. officials in Iraq under George W. Bush and one of the few to remain in the government when President Barack Obama took office. That comment was an apparent reference to the fact that ISIS formed in the wake of the Obama administration's withdrawal of U.S. forces from Iraq in 2011. "The tide of war is receding," Obama said at the time.