U.S. Secretary of Defense Jim Mattis attends the swearing in ceremony for new Secretary of Veterans Affairs Robert Wilkie in the Oval Office of the White House in Washington, U.S., July 30, 2018. REUTERS/Brian Snyder

WASHINGTON (Reuters) - U.S. Defense Secretary Jim Mattis told President Donald Trump in his resignation letter on Thursday that he was leaving the administration so Trump could have a Pentagon chief with views “better aligned” with his own.

In a letter that stressed the value Mattis placed on U.S. alliances and the need to be “unambiguous” with countries like China and Russia, Mattis wrote to 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.”