President Trump took swipes Monday at outgoing Defense Secretary Jim Mattis and diplomat Brett McGurk, both of whom resigned in large part over the president's decision to pull troops from Syria.

The president first trained his criticism on Mattis, a day after announcing his Pentagon chief would be leaving the administration on Jan. 1, weeks earlier than his planned February departure. In more evidence of escalating tensions between the two men, Trump claimed Mattis doesn't understand his concerns about "subsidizing" foreign militaries.

“We are substantially subsidizing the Militaries of many VERY rich countries all over the world, while at the same time these countries take total advantage of the U.S., and our TAXPAYERS, on Trade,” Trump tweeted. “General Mattis did not see this as a problem. I DO, and it is being fixed!”

CLICK HERE TO GET THE FOX NEWS APP

In his resignation letter last Thursday, Mattis, 68, had said he would remain in his role for three more months. But Trump abruptly announced over the weekend that Deputy Secretary of Defense Patrick Shanahan would replace Mattis on Jan. 1.

The sudden change strips Mattis of any chance to further frame national security policy or smooth rattled relations with allies through the originally planned transition at the end of February. And it reflects White House displeasure with the retired Marine Corps general's resignation letter.

In the resignation letter, Mattis made clear he did not see eye to eye with the president on several issues. Mattis was also unhappy with Trump's order to develop plans to pull up to half of the 14,000 U.S. forces from Afghanistan.

On Sunday, Trump's acting chief of staff said that Trump had known for "quite some time now" that he and Mattis "did not share some of the same philosophies ... [or] have the same world view."

Mick Mulvaney told ABC's "This Week" that the president and his defense chief "just could never get on the same page" on Syria, adding that Trump had said since his presidential campaign that "he wanted to get out of Syria." Mulvaney said the president "is entitled to have a secretary of defense who is committed to that same end."

The Trump administration is making plans to pull all 2,000 troops out of Syria. Trump tweeted last week that “we have defeated ISIS in Syria, my only reason for being there during the Trump Presidency.”

Trump has stood by his Syria decision despite fierce bipartisan blowback, telling detractors that the pullout should come as “no surprise” given his 2016 campaign promises and arguing that America’s role as “Policeman of the Middle East” is not worth the sacrifice.

In the wake of Mattis' departure, Brett McGurk, the U.S. envoy for the global coalition to defeat the Islamic State (ISIS), also was reported to be leaving his post in protest. McGurk said in a resignation letter to Secretary of State Mike Pompeo that ISIS was on the run, but wasn’t yet defeated -- and that U.S. work in Syria wasn’t yet done.

Since McGurk's announcement, Trump has lambasted him on social media for his role in the Iran nuclear deal brokered by former President Barack Obama. While serving as deputy assistant secretary of state for Iraq and Iran, McGurk spearheaded the secret negotiations with Iran that led to a prisoner swap and release of four Americans from Evin Prison in Tehran. This coincided with a cash payout to Tehran, ostensibly as part of a legal settlement.

Trump on Monday blamed McGurk for that payout, as he fumed over McGurk's "sympathizers."

"For all of the sympathizers out there of Brett McGurk remember, he was the Obama appointee who was responsible for loading up airplanes with 1.8 Billion Dollars in CASH & sending it to Iran as part of the horrific Iran Nuclear Deal (now terminated) approved by Little Bob Corker," Trump tweeted.

Fox News’ Gregg Re and The Associated Press contributed to this report.