Washington (CNN) Brett McGurk, the special presidential envoy for the global coalition to counter ISIS, submitted his resignation Friday because of President Donald Trump's decision to pull US forces out of Syria, according to two senior officials and several sources familiar with his thinking.

McGurk had previously said privately that he was going to leave the administration in February of next year.

A State Department official told CNN that McGurk had informed Secretary of State Mike Pompeo on Friday that he was resigning, effective December 31.

CBS News was the first to report the news of McGurk's resignation, which came one day after Defense Secretary James Mattis resigned , also in part due to the Syria decision.

Going against the advice of his military and national security advisers, Trump on Wednesday announced the "full" and "rapid" withdrawal of US military from Syria, declaring that the US has defeated ISIS.

McGurk was in Iraq meeting with senior leaders when Trump tweeted out the decision. Sources familiar with the matter said McGurk was frustrated over Trump's sudden announcement, which was the opposite of the strategy he had just been briefing coalition partners on while in the region: to stay in Syria, fight ISIS and counter Iran.

According to the sources, McGurk viewed the Syria decision as reckless and couldn't defend it, let alone execute it. He felt his integrity and his credibility were on the line, the sources told CNN.

"Brett was able to get US coalition partners to commit troops based on a code of trust with allies that the US was in the fight with them," said one source familiar with McGurk's thinking. "So after this sudden snap decision by the President to get out, he knew he could not be the one carrying this out."

McGurk was particularly concerned about how the withdrawal would leave US allies in the region, specifically the Kurds, abandoned in the fight against ISIS, a source told CNN. US coalition partners were also worried about the sudden shift in policy. For example, terrorist attacks earlier this year in Paris were hatched from the ISIS stronghold of Raqqa in Syria.

McGurk, however, had long been dissatisfied with the Trump administration's policy in Syria and what he felt was a lack of strategy, the source said.

A senior administration official downplayed the move, calling McGurk "an architect of Obama's failed Iran deal," who "was already scheduled to depart from his role in January."

The sources said Mattis' resignation also played a part in the timing of McGurk's resignation.

Earlier this month, McGurk said the roughly 2,000 US forces would remain in Syria even after ISIS was defeated.

"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 during a State Department briefing on December 11.

He added, "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."

"I think it says a lot for how strongly he feels about the President's decision that even just a couple of months before he was going to leave anyway, he's leaving now and so immediately," CNN national security analyst John Kirby, a retired US Navy rear admiral, told CNN's Fredricka Whitfield on Saturday.

Kirby added, "It just shows you how significant it is and how severe it's going to be to our ability to keep this coalition together going forward."

First appointed to the envoy role in 2015, McGurk brought decades of experience in the region to overseeing a global coalition of 79 members.

McGurk was one of the few Obama administration holdovers to serve in the current administration. He also served under President George W. Bush.

When McGurk was initially going to leave the Trump administration in February, he was planning a move to a position at Stanford University, sources said.