WASHINGTON — Defense Secretary James Mattis will step down at the end of February, telling President Donald Trump in a letter Thursday that he has "a right to have a Secretary of Defense whose views are better aligned with yours."
In his extraordinary letter to Trump, Mattis said that a long-held "core belief" of his "is that our strength as a nation is inextricably linked to the strength of our unique and comprehensive system of alliances and partnerships."
Without maintaining those alliances, he wrote, "we cannot protect our interests or serve" the role of an "indispensable nation in the free world."
The president has frequently lashed out at America's allies in France, the United Kingdom, Canada and Germany, while at times appearing to side with U.S. adversaries over his own officials.
"My views on treating allies with respect and also being clear-eyed about both malign actors and strategic competitors," Mattis said, "are strongly held and informed by over four decades of immersion in these issues."
Mattis' resignation letter, which a Pentagon spokeswoman said was hand-delivered to the president Thursday afternoon, comes on the heels of Trump's controversial plan to withdraw U.S. troops from Syria.
That announcement on Wednesday will reportedly take more than 2,000 U.S. service members 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."
The move was met with heated criticism from a number of Trump's usual allies in Congress. But Russian President Vladimir Putin said that Trump made the "correct" move, because the U.S. troops had no legal right to be in Syria.
On Thursday evening, defense officials told NBC News that the White House has ordered the Pentagon to look into plans for withdrawing troops from Afghanistan, as well.
Trump had announced that Mattis "will be retiring, with distinction," in a pair of tweets Thursday. A new defense secretary "will be named shortly," Trump said.
A senior administration official told CNBC that Mattis told Trump he was resigning during a meeting Thursday. "He and the president had differences on some issues," the official said.
Mattis, a 68-year-old retired Marine Corps general, was widely viewed as a stabilizing influence within an often chaotic White House.
Sen. Marco Rubio, R-Fla., said in a tweet that Mattis' loss "makes it abundantly clear that we are headed towards a series of grave policy errors which will endanger our nation, damage our alliances & empower our adversaries."
Sen. Lindsey Graham, R-S.C., reacted to the news "with great sadness," saying in a tweet that Mattis is "one of the great military leaders in American history."
Sen. Susan Collins, R-Maine, said Mattis' departure "is a real loss for our nation, our troops, and this Administration."
House Speaker Paul Ryan, R-Wis., said in a statement that "the House is indebted to Secretary Mattis for his service."
Senator Bob Corker, chairman of the Senate Foreign Relations Committee, praised Mattis as a patriot who "always put the country above self and represents the very best of America."
House Minority leader Nancy Pelosi, in an evening press conference, said she was "shaken" by the news of Mattis' decision to step down. He is "a comfort to many of us as a voice of stability in the Trump administration," she said.
"This is very serious for our country," Pelosi continued.
Mattis' celebrated military career spanned four decades. Prior to joining Trump's Cabinet, the four-star general was the head of U.S. Central Command, which directs military operations and oversaw the wars in Iraq and Afghanistan.
He was known before and during his White House tenure for his even-keeled demeanor and strategic mind and is broadly held in high esteem among Republicans and Democrats alike.
"I'm shaken by the news because of the patriot that Secretary Mattis is," said House Minority Leader Nancy Pelosi, D-Calif., on Capitol Hill on Thursday night. "This is very serious for our country."
Mattis was also famed for his prolific reading habit, to which he has attributed his leadership success.
The White House did not immediately respond to CNBC's request for comment on the president's announcement. A press officer for the Pentagon told CNBC, "I have nothing to provide."