Defense Secretary James Mattis is leaving the administration at the end of February—making it clear he has a different worldview than President Donald Trump.

“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, a retired Marine general, said in his letter to Trump Thursday.

Trump first announced Mattis’ decision on Twitter.

Mattis announced his exit one day after the president declared plans to withdraw U.S. troops from Syria—prompting concern among many Republicans and Democrats in Congress.

“Secretary Mattis has served with distinction. His tireless actions to rebuild the readiness of the armed forces after years of neglect and in reassuring key allies have had extraordinarily positive outcomes for the U.S.,” Thomas Spoehr, the director of national defense for The Heritage Foundation, told The Daily Signal. “Mattis is also right, it’s important that the president send clear and consistent messages to friends and competitors.”

Mattis has been highly respected on both sides.

House Minority Leader Nancy Pelosi, D-Calif., the likely House speaker in January, used the Mattis departure to take a swipe at Trump.

Mattis did not mention Syria in the letter, but focused on the importance of international alliances to confront mounting threats to the United States.

“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,” the Mattis letter said.

While Trump referred to the defeat of the Islamic State as a reason to leave Syria, Mattis referred to this U.S. accomplishment as an example of working with allies.

“Like you, I have said from the beginning that the armed forces of the United States should not be the policeman of the world,” Mattis wrote. “Instead, we must use all tools of American power to provide for the common defense, including providing effective leadership to our alliances. NATO’s 29 democracies demonstrated that strength in their commitment to fighting alongside us following the 9-11 attack on America. The Defeat-ISIS coalition of 74 nations is further proof.”

The Mattis letter continues:

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. That is why we must use all the tools of American power to provide for the common defense.

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.