Mattis, perhaps the most respected foreign policy official in Trump's administration, will leave by the end of February after two tumultuous years struggling to soften and moderate the president's hardline and sometimes sharply changing policies. He told Trump in a letter that he was leaving because "you have a right to have a Secretary of Defense whose views are better aligned with yours."