Defense Secretary James Mattis, the last of a team President Trump dubbed “my generals,” will step down early next year amid deepening rifts with the White House on crucial foreign policy matters, marking the departure of an original Trump Cabinet member and creating a leadership void at the Pentagon at a critical time for the president at home and abroad.

After meeting with Mr. Trump earlier in the day, Mr. Mattis said in a resignation letter Thursday evening that his views are no longer aligned with those of the commander in chief. He took thinly veiled shots at the president over America’s “common defense,” the best way to confront rivals such as China and Russia, and the guiding principle of “treating allies with respect.”

Notably, the Mattis letter said it was a privilege to “serve the nation and our men and women in uniform” — without mentioning the president.

His coming exit, first announced by Mr. Trump on Twitter, sent shock waves through Washington and governments around the world just a day after the president made the stunning declaration that the U.S. had defeated the Islamic State in Syria and that all American troops would soon leave the country.

Mr. Mattis strongly disagreed with the decision and argued to Mr. Trump that withdrawing could leave allies who fought alongside U.S. forces in the lurch. The secretary reportedly tried to persuade Mr. Trump to change his mind on Syria during their White House meeting but was unsuccessful.

The defense secretary’s frustration may have been compounded by reports that Mr. Trump was contemplating a second partial troop withdrawal opposed by many of his senior security advisers in Afghanistan. Together with Syria, such a withdrawal would mark a fundamental shift in American foreign policy in the Middle East.

Reaction to the resignation was swift.

“Just read Gen. Mattis‘ letter,” Sen. Marco Rubio, Florida Republican, tweeted shortly after the news broke. “It makes it abundantly clear that we are headed toward a series of grave policy errors which will endanger our nation, damage our alliances and empower our adversaries.”

“Everything that indicates strength, everything that indicates knowledge, is leaving this administration,” said Senate Minority Leader Charles E. Schumer, New York Democrat. He said recent departures, including former Gen. John F. Kelly’s decision to step down as White House chief of staff, are signs of “chaos” under Mr. Trump.

In his two-page letter, Mr. Mattis spoke of the need for America to stand up strongly to “authoritarian” regimes such as Russia and China. But his central disagreement appeared to focus on the decision to pull out of Syria and what it means for the U.S. relationship with key allies.

“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,” Mr. Mattis wrote. “While the U.S. 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.

“My views on treating allies with respect and also being clear-eyed about both malign actors and strategic competitors are strongly held and informed by over four decades of immersion in these issues,” he continued. “Because you have the right to have a secretary of defense whose views are better aligned with yours on these and other subjects, I believe it is right for me to step down from my position.”

The president’s decision to withdraw from Syria has sparked bipartisan outrage. Publicly, Mr. Mattis stayed mum on the subject, but he and other Pentagon officials in recent weeks have stressed that the Islamic State is far from defeated — something Mr. Trump directly contradicted in his withdrawal order.

Mr. Trump praised Mr. Mattis on Twitter, saying he made great strides in rebuilding the military for 21st-century conflicts. His tweet suggested only that Mr. Mattis decided it was time to retire.

“During Jim’s tenure, tremendous progress has been made, especially with respect to the purchase of new fighting equipment,” Mr. Trump said. “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!”

Mr. Trump earlier this month announced that Gen. Mark A. Milley, Army chief of staff, will succeed Gen. Joseph F. Dunford as chairman of the Joint Chiefs of Staff next fall.

White House officials Thursday night tried to downplay the divide between Mr. Trump and Mr. Mattis and took issue with the narrative that the secretary was resigning in protest over Syria

“It’s very normal at this point in the administration to have turnover,” White House adviser Stephen Miller told CNN.

Respected voice

Across Washington, reaction to Mr. Mattis‘ departure was a mix of respect for decades of military service and fear that a respected figure widely seen as a somber voice of reason in a chaotic administration was leaving.

Mr. Rubio said filling Mr. Mattis‘ shoes at the Pentagon will be no easy task. He said he hoped the secretary did not resign only because of fundamental disagreements over Syria, though Mr. Mattis was reportedly “livid” heading into his meeting with Mr. Trump.

“For the sake of our national security, I hope his decision to resign was motivated solely by a desire to enjoy a well-deserved retirement,” Mr. Rubio said.

Sen. Mark R. Warner, Virginia Democrat, characterized Mr. Mattis‘ retirement as scary. He tweeted that Mr. Mattis “has been an island of stability amidst the chaos of the Trump administration.”

“As we’ve seen with the president’s haphazard approach to Syria, our national defense is too important to be subjected to the president’s erratic whims,” he added.

Other lawmakers agreed and openly worried that Mr. Mattis was essentially being pushed out of an administration that wrongly believes the fight against Islamic State terrorists is over.

“This is a sad day for America because Secretary Mattis was giving advice the president needs to hear,” said Sen. Ben Sasse, Nebraska Republican. “Mattis rightly believes that Russia and China are clear adversaries and that we are at war with jihadists across the globe who plot to kill Americans at home … and no, ISIS is not gone.”

Mr. Trump will be searching for a new defense chief while he installs a new White House chief of staff, shepherds a new attorney general nominee through Senate confirmation, deals with a Democratic House coming to power, bargains over a looming government shutdown Friday, and deals with special counsel Robert Mueller’s widening investigation into claims that his presidential campaign colluded with Russia

Democratic leaders pounced on the news of Mr. Mattis‘ resignation as further proof that the wheels are coming off Mr. Trump’s presidency.

“As this administration continues to implode, Secretary Mattis‘ extraordinary resignation is a significant loss and a real indication that President Trump’s foreign policy agenda has failed and continues to spiral into chaos,” Sen. Robert Menendez of New Jersey, the ranking Democrat on the Senate Foreign Relations Committee, said in a statement. “Clearly, Secretary Mattis‘ resignation was prompted by the president’s flawed and hasty decision to withdraw our troops from Syria.”

Speculation over Mr. Mattis‘ dimming future in the administration heightened after the announced departure of Mr. Kelly, a fellow former Marine Corps general, as chief of staff this month. The end of Mr. Mattis‘ tenure in the Trump administration marks the last former general officer to leave a White House post.

Retired Gen. Michael Flynn quit after only a month as White House national security adviser after he admitted misleading Vice President Mike Pence about the extent of his contacts with Russian officials. Flynn is awaiting sentencing for lying to the FBI in Mr. Mueller’s Russia investigation.

Army Gen. H.R. McMaster succeeded Flynn as national security adviser, but he clashed with Mr. Trump and lasted less than a year in the post.

Mr. Kelly began in the administration as homeland security secretary and was tapped in July 2017 as White Housechief of staff to bring more discipline to the West Wing. Mr. Trump announced that Mr. Kelly will leave his post at the end of this year.

A deteriorating relationship

While Mr. Trump and Mr. Kelly were known to engage in heated arguments inside the West Wing, the relationship between the president and Mr. Mattis was more nuanced. The two men were always publicly respectful of each other.

But behind the scenes, the deep policy disagreements had been piling up. Mr. Mattis recently went to the mat with the White House over a planned Defense Department budget cut, privately telling the president that he could not execute the administration’s national security strategy with a spending level of $700 billion. Mr. Trump eventually reversed course and raised the figure to $750 billion.

Mr. Mattis also opposed the president’s decision to withdraw from the Paris climate accord in the summer of 2017. He also spoke out against the concept of a U.S. Space Force, though he ultimately got on board with the idea after Mr. Trump insisted on it.

Mr. Mattis was privately critical of the president’s decision to send U.S. troops to the Mexican border, and he opposed Mr. Trump’s suggestion that members of the armed forces could be drafted to construct a wall.

The defense secretary was largely left in the dark when Mr. Trump announced over the summer that the U.S. would suspend key joint military drills with South Korea amid the president’s unprecedented diplomatic outreach to North Korea. Mr. Mattis also expressed serious reservations about the White House’s decision to move the U.S. Embassy in Israel from Tel Aviv to Jerusalem.

Perhaps most important, Mr. Trump’s determination to challenge the foreign policy establishment on the wisdom of overseas U.S. military missions and alliances led to repeated clashes between the White House and the Pentagon. The Syria decision — and the possible drawdown in Afghanistan — deeply unsettled Mr. Mattis.

Mr. Trump also clearly chafed at the respect and praise Mr. Mattis received in Congress and abroad. The Pentagonchief was often portrayed in the press as the last line of defense against Mr. Trump’s worst foreign policy impulses. The billionaire real estate developer and the scholarly, professional soldier also failed to click on less-momentous issues. Mr. Trump reportedly was frustrated at the Pentagon’s slow-walking of his order banning transgender troops from the military and of his desire for an expensive military parade on the streets of Washington.

The relationship clearly reached a tipping point in October when Mr. Trump called Mr. Mattis “a Democrat” during a “60 Minutes” interview.

I have a very good relationship with him. … I think he’s sort of a Democrat, if you want to know the truth,” Mr. Trumpsaid. “But Gen. 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.”

Mr. Mattis responded by saying he had never been affiliated with any political party.

The unexpected timing of the resignation left Mr. Trump with no clear favorite as a replacement. One long-rumored candidate is Sen. Tom Cotton, a hawkish Arkansas Republican who received the Bronze Star while serving in the Army in Iraq and Afghanistan.

Before ascending to the defense secretary post, Mr. Mattis‘ nickname in the media was “Mad Dog Mattis” — a moniker that reporters often used to describe the respect he had from rank-and-file soldiers in the field.

But it may also have been tied to Mr. Mattis‘ notoriously bare-knuckle demeanor as a combat general in the Iraq and Afghanistan wars, where he offered sharp-tongued quotes to the press.

He was quoted as saying that a good soldier “follows orders, but a true warrior wears his enemy’s skin like a poncho,” and to live by the motto: “Be polite, be professional, but have a plan to kill everybody you meet.”

The retired Marine general said during his defense secretary confirmation hearing in January 2017 that the “nickname was given to me by the press.”

“Perhaps they didn’t get it quite right,” he added, suggesting he wasn’t entirely comfortable with the moniker.

Some reports have noted that the nickname is never used by Mr. Mattis‘ close friends, who regard him as a kind and studious man, who is so well-read in military history that he has a penchant for saying memorable things of his own.

• Guy Taylor and Dave Boyer contributed to this report.

Copyright © 2018 The Washington Times, LLC.