US Defense Secretary James Mattis on Thursday abruptly said he was quitting after falling out with President Donald Trump over his foreign policies, one day after Trump rebuffed top advisers and decided to pull all US troops out of Syria.