Mattis was nominated as secretary of defense by president-elect Donald Trump, and confirmed by the Senate on January 20, 2017. As secretary of defense, Mattis affirmed the United States' commitment to defending longtime ally South Korea in the wake of the 2017 North Korea crisis. An opponent of proposed collaboration with China and Russia, Mattis stressed what he saw as their "threat to the American-led world order". Mattis occasionally voiced his disagreement with certain Trump administration policies such as the withdrawal from the Iran nuclear deal, withdrawals of troops from Syria and Afghanistan, and budget cuts hampering the ability to monitor the impacts of climate change. Mattis also dissuaded Trump from attempting to assassinate Bashar al-Assad, the President of Syria. On December 20, 2018, after failing to convince Trump to reconsider his decision to withdraw all American troops from Syria, Mattis announced his resignation effective the end of February 2019, but after Mattis's resignation generated significant media coverage, Trump abruptly accelerated Mattis departure date to January 1, stating that he had essentially fired Mattis.