Washington (CNN) President Donald Trump announced on Sunday he would replace Defense Secretary James Mattis at the start of the new year, two months earlier than Mattis' planned departure.

"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.

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! — Donald J. Trump (@realDonaldTrump) December 23, 2018

Mattis announced his resignation on Thursday with a letter saying his views were not aligned with Trump, who said Mattis would retire at the end of February.

Mattis' last day is expected to be Jan. 1, according to a source familiar with the matter. He is not expected to have a big, public farewell ceremony to try to prevent further exacerbating tensions between himself and Trump, the source said.

In his resignation letter, Mattis cited posture hearings on Capitol Hill where he would have faced questions on Trump's decision to pull out of Syria and Afghanistan and a NATO ministerial conference as reasons for his staying on until the end of February.

Read More