President Donald Trump will push Defense Secretary James Mattis out of his administration on January 1 amid anger at how Mattis' resignation letter was seen as a rebuke of his presidency.

Mattis was supposed to remain on the job until Feb. 28.

Deputy Defense Secretary Patrick Shanahan will be named as acting secretary.

'I am pleased to announce that our very talented Deputy Secretary of Defense, Patrick Shanahan, will assume the title of Acting Secretary of Defense starting January 1, 2019. Patrick has a long list of accomplishments while serving as Deputy, & previously Boeing. He will be great!,' Trump tweeted on Sunday afternoon.

President Donald Trump (left) is pushing Defense Secretary James Mattis (right) out of his administration as of January 1

Trump announced Mattis' departure on Sunday

Mattis named late February as his exit in his resignation letter, calling it 'a date that should allow sufficient time for a successor to be nominated and confirmed as well as to make sure the Department's interests are properly articulated and protected at upcoming events.'

His letter also noted his views were not aligned with the president's.

This will be the third acting Cabinet member in Trump's administration: Matthew Whitaker is acting attorney general; David Bernhardt will take over as acting Secretary of Interior with Ryan Zinke exit at end of the year; and now Shanahan at Pentagon.

Mick Mulvaney has been named acting chief of staff, which the Trump White House classifies as Cabinet level position.

Pentagon spokesman Col. Rob Manning said in a statement Sunday that 'the secretary of defense serves at the pleasure of the President. The department remains focused on national security.'

Mulvaney said on Sunday - before Mattis' early departure was announced - that the relationship between Trump and Mattis had been 'fraying.'

'Look, let's be honest with each other. I think the relationship between these two men have been fraying. I think the president no longer relied on Mattis to be able to deliver the president's vision,' he said on 'Fox News Sunday.'

He noted on ABC's 'This Week' that the two men 'didn't have the same world view. You heard the president say a couple weeks ago, I think, in an interview that he recognized that Mr. Mattis - he called him a Democrat.'

He added: 'So no, I don't think it was a surprise.'

Tensions have long said to be thick between the two men. Mattis' departure brought groans from Trump critics, who claimed one of the few 'grownups' in the Trump administration was leaving.

Democrats also used Mattis' fiery resignation letter, which he told aides to distribute, as their new cause celebrity.

But lawmakers and the defense industry were also rattled by the departure.

'I was one of many senators who privately sat down with General Mattis and said, 'Please stay, stay as long as you possibly can,' Democratic Sen. Dick Durbin said Sunday on NBC's Meet the Press.' 'We desperately need your mature voice, your patriotism in the room when this president's making life or death decisions about national security. But it obviously reached a breaking point.'

He added: 'It breaks my heart that he's going to step aside. We counted on him to be there and to stop this president from his worst impulse.'

Trump complained on Sunday the media was more focused on his decision to remove U.S. troops from Syria than the two pieces of legislation he signed intio law last week.

'We signed two pieces of major legislation this week, Criminal Justice Reform and the Farm Bill. These are two Big Deals, but all the Fake News Media wants to talk about is “the mistake” of bringing our young people back home from the Never Ending Wars. It all began 19 years ago!,' he wrote.

When Mattis announced his exit on Thursday, the onetime Marine Corps general did it on his own terms – listing the ways he's incompatible with his commander-in-chief.

Chief among them is that Mattis believes Trump hasn't tended the diplomatic garden of international alliances, leaving the United States unable to defend its interests overseas.

Trump touted the legislation he signed into law last week with a complaint most of the news coverage focused on his decision to remove U.S. troops from Syria

Trump is said to be angry at how Mattis' (left) resignation letter is been seen as a rebuke of his presidency

Deputy Secretary of Defense Patrick M. Shanahan will be named acting Pentagon chief

And the timing of his announcement was unmistakably linked to the president's announcement Thursday of a troop pullout from Syria that the two men disagreed about.

'Because you have the right to a Secretary of Defense whose views are better aligned with yours on these and other subjects,' Mattis wrote after his litany, 'I believe it is right for me to step down from my position.'

'One core belief I have always held is that our strength as a nation is inextricably linked to the strength of our unique and comprehensive system of alliances and partnerships,' he wrote.

'While the US remains the indispensable nation in the free world, we cannot protect our interests or serve that role effectively without maintaining strong alliances and showing respect to those allies.'

Mattis also declared that America 'must be resolute and unambiguous in our approach to those countries whose strategic interests are increasingly in tension with ours.'

Trump has swiped at critics of his decision to withdraw U.S. troops from Syria by saying if anyone else brought soldiers home they would be branded a 'hero'.

In a series of fiery tweets Saturday night, the president also dismissed the top U.S. envoy in the fight against ISIS as an 'Obama appointee' who he claimed he did not know.

President Donald Trump (left) Saturday dismissed special envoy Brett McGurk (right) has an 'Obama' appointee' who he didn't know and was set to stand down a month from now. This follows McGurk's decision to quit his role two months earlier than expected

Trump said he had an 'interesting relationship with Mattis and he had given him resources

Trump launched a tirade on Twitter (pictured) against top US officials who resigned within days of each other after they disagreed with his decision to pull troops out of Syria

Earlier Saturday, Special Presidential Envoy for the Global Coalition to Counter ISIL Brett McGurk announced his resignation in the wake of Trump's decision to pull troops out of Syria and just days after Mattis's announced departure.

McGurk was to leave the role in February but moved up his departure date by two months to December 31 after very publicly stating that the move to pull American forces at this time could result in a 'possibly catastrophic outcome'.

Responding to the news , Trump tweeted: 'Brett McGurk, who I do not know, was appointed by President Obama in 2015.

'Was supposed to leave in February but he just resigned prior to leaving. Grandstander? The Fake News is making such a big deal about this nothing event!.

'If anybody but your favorite President, Donald J. Trump, announced that, after decimating ISIS in Syria, we were going to bring our troops back home (happy & healthy), that person would be the most popular hero in America. With me, hit hard instead by the Fake News Media. Crazy!

The veteran diplomat, who got his start in the administration of George W. Bush and was appointed to his current post by Barack Obama, now joins Mattis in an administration exodus of experienced national security officials.

Trump also fired a parting shot at Mattis, the most respected foreign policy official in the administration who will leave by the end of February.

He tweeted: 'When President Obama ingloriously fired Jim Mattis, I gave him a second chance.

'Some thought I shouldn't, I thought I should. Interesting relationship-but I also gave all of the resources that he never really had. Allies are very important-but not when they take advantage of U.S'.

President Donald Trump (2nd L) and Secretary of Defense James Mattis (2nd R) participate in a moment of silence for the late President George H. W. Bush as they attend the Army-Navy game in early December

The former United States Marine Corps general commanded the 1st Marine Division during the 2003 invasion of Iraq.

He later served as the Commander of United States Central Command under Obama.

Trump made waves Wednesday at the Pentagon by announcing his withdrawal of America's mid-size military contingent stationed in Syria.

The decision, reached Tuesday in a small group meeting at the White House, didn't include consultation with Gen. Joseph F. Dunford Jr., the chairman of the Joint Chiefs of Staff.

Mattis and Secretary of State Mike Pompeo were in the room. Both objected.

Trump declared this week that his administration has won the war against the ISIS terror army, even though the Pentagon has said the group still has 30,000 soldiers in Iraq and Syria.

Mattis has long been rumored to be on the way out - talk that Trump declined to shoot down.

Asked in October during a '60 Minutes' interview whether his Pentagon chief might be on his way out, President Trump responded: 'Well, I don't know. He hasn't told me that.'

'I have a very good relationship with him. It could be that he is. I think he's sort of a Democrat, if you want to know the truth,' he said.

'But General Mattis is a good guy. We get along very well. He may leave. I mean, at some point, everybody leaves. Everybody. People leave. That's Washington.'