Read James Mattis' resignation letter to Trump: 'We must be resolute and unambiguous' toward Russia and China

US President Donald Trump speaks as Defense Secretary James Mattis (L) looks on during a meeting with senior military leaders in the Cabinet Room of the White House on October 5, 2017.
Mandel Ngan | AFP | Getty Images

James Mattis stepped down as President Donald Trump's secretary of Defense on Thursday.

The president announced on Twitter that the retired general would depart the administration in February.

@realDonaldTrump: General Jim Mattis will be retiring, with distinction, at the end of February, after having served my Administration as Secretary of Defense for the past two years. During Jim's tenure, tremendous progress has been made, especially with respect to the purchase of new fighting...

@realDonaldTrump: ....equipment. General Mattis was a great help to me in getting allies and other countries to pay their share of military obligations. A new Secretary of Defense will be named shortly. I greatly thank Jim for his service!

In a letter addressed to Trump, Mattis said that "because you have a right to have a Secretary of Defense whose views are better aligned with yours" on a number of subjects, "I believe it is right for me to step down from my position."

In his letter, Mattis cited the importance of US alliances, particularly NATO, and said the US must stand 'resolute and unambiguous' in the face of authoritarian countries such as China and Russia.

Jim Mattis resigned over fundamental disagreements with President Trump
Jim Mattis resigned over fundamental disagreements with President Trump

Mattis' resignation comes on the heels of Trump's controversial plan to withdraw U.S. troops from Syria.

The president's decision, announced on Wednesday, will reportedly take more than 2,000 U.S. servicemembers out of the country, ending the ground strategy against the Islamic State. Trump said in a tweet Wednesday morning that "we have defeated ISIS in Syria, my only reason for being there during the Trump Presidency."

Neither the White House nor The Pentagon immediately responded to CNBC's requests for comment on the president's announcement.

Read Mattis' full letter to the president below: