For indispensable reporting on the coronavirus crisis, the election, and more, subscribe to the Mother Jones Daily newsletter.

Defense Secretary Jim Mattis will be leaving the Trump administration by January 1, President Donald Trump tweeted Sunday morning. His departure from the White House will come more than two months earlier than planned, likely due to the president’s fury over the defense secretary’s resignation letter, which was widely seen as a sharp criticism of the administration’s “America First” foreign policy agenda.

An aide who spoke to the New York Times said Trump initially praised Mattis when he tweeted that the secretary of defense would be resigning because he did not understand Mattis’ resignation letter to be a strongly-worded rebuke of the president’s approach to foreign affairs. As the news coverage of Mattis’ departure grew more negative, Trump reportedly became “increasingly angry” and floated the idea of forcing him out to his aides.

Deputy Secretary of Defense Patrick Shanahan, a former Boeing executive, will take his place as acting secretary of defense.