Secretary of Defense James Mattis James Norman MattisBiden courts veterans amid fallout from Trump military controversies Trump says he wanted to take out Syria's Assad but Mattis opposed it Gary Cohn: 'I haven't made up my mind' on vote for president in November MORE said in his resignation letter Thursday that he and President Trump Donald John TrumpBiden on Trump's refusal to commit to peaceful transfer of power: 'What country are we in?' Romney: 'Unthinkable and unacceptable' to not commit to peaceful transition of power Two Louisville police officers shot amid Breonna Taylor grand jury protests MORE did not see eye to eye on a number of policies.

Trump announced via Twitter that the Pentagon chief would be stepping down at the end of February, and Mattis, in his resignation letter to the president, cited various philosophical and practical areas of disagreement between them.

“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,” Mattis wrote in the letter, which was devoid of any praise for the commander in chief.

ADVERTISEMENT

Trump and his defense secretary were known to have disagreements over a slew of key White House policies, particularly over the president’s posture toward NATO and other allies over funding for military alliances. Trump repeatedly demanded historical friends of the U.S., including NATO, South Korea and Japan, pay more for what the president described as one-way transactions for U.S.-provided defense.

“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. 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 wrote.

Mattis and Trump also butted heads over Russia, with Mattis firmly accepting the intelligence community’s assessment that Moscow interfered in the 2016 election and the president appearing at times to accept it and at other times to accept Russian President Vladimir Putin’s denials.

“It is clear that China and Russia, for example, want to shape a world consistent with their authoritarian model — gaining veto authority over other nations’ economic, diplomatic, and security decisions — to promote their own interests at the expense of their neighbors, America and our allies,” Mattis wrote.

“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. We must do everything possible to advance an international order that is most conducive to our security, prosperity and values, and we are strengthened in this effort by the solidarity of our alliances,” he wrote.

The two also disagreed over banning transgender troops from serving in the military, canceling joint U.S.-South Korea military exercises, withdrawing from the Iran nuclear deal and deploying troops to the U.S.-Mexico border.

Mattis’s departure, which comes as Trump also seeks to replace his chief of staff, Interior secretary and attorney general, was made public the day after Trump announced the sudden withdrawal of U.S. troops in Syria.