President Donald Trump went after his outgoing defense secretary, Jim “Mad Dog” Mattis, on Monday over a disagreement about which countries are threats to the U.S.

Trump announced last week that he was withdrawing thousands of troops from Syria and Afghanistan in a move that was met with backlash.

Mattis sent a shock wave through Washington, D.C., by issuing a resignation letter shortly afterward.

Trump later went after Mattis for not seeing countries that take advantage of the United States as a threat.

“To those few senators who think I don’t like or appreciate being allied with other countries, they are wrong, I DO,” Trump tweeted Monday. “What I don’t like, however, is when many of these same countries take advantage of their friendship with the United States, both in military protection and trade.”

Related: Trump Faces GOP Backlash Over Troop Reductions in Syria and Afghanistan

Mattis detailed his belief about having a strong global presence in his resignation letter.

He also said that the president has the right to have a secretary of defense whose views better align with his.

Mattis said he was willing to work until February 28 to give the administration time to find a replacement, but now he’ll be exiting the government at the end of this year.

Who do you think would win the Presidency?

By completing the poll, you agree to receive emails from LifeZette, occasional offers from our partners and that you've read and agree to our privacy policy and legal statement.

Brett McGurk, special presidential envoy for the Global Coalition to Counter ISIL, also resigned following the troop withdrawal announcement.

Trump later announced that Deputy Secretary of Defense Patrick Shanahan will become the acting secretary of defense starting January 1.

“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!”

Trump is also facing additional opposition from within his own party over the decision to reduce troops in Syria and Afghanistan.

Sen. Lindsey Graham (R-S.C.) and other Republicans are warning the president that it’s just not the right time to make such a move given conditions on the ground.

Trump is still getting some support from party members for his decision. Sen. Rand Paul (R-Ky.) thanked the president for bringing troops home from the war-torn country during a speech on the floor on Wednesday.

Paul made the comments while speaking out against legislation that would prolong the conflict in Syria.

Related: Paul Gives Spirited Defense of Trump’s Decision to Pull Troops Out of Syria, Afghanistan

“I’m very proud of the president. This is exactly what he promised, and I think the people agree with him,” Paul later told CNN host Jake Tapper on Sunday morning.

“I think the people actually are with [President Trump]. Washington’s against him, but this wouldn’t be the first time Washington doesn’t represent the people very well,” Paul added.

The withdrawal would involve roughly 7,000 troops from Afghanistan in the coming months — about half the number there now, The New York Times and other publications reported.

Trump made the decision to start pulling troops from Syria as well around the same time.

Check out this video: