Fed up with the negative media coverage over the past four days, President Donald Trump on Sunday expedited the departure of Defense Secretary James Mattis two months earlier than planned and named the Pentagon’s No. 2 as a temporary replacement.

Anger has mounted in the West Wing as television broadcasts and newspaper headlines focused on Mattis’ candid resignation letter criticizing the President’s treatment of allies and warming relations with China and Russia, administration officials told TIME.

In the letter, which Mattis hand-delivered to the White House on Thursday, Mattis suggested his last day in the Pentagon would be Feb. 28, 2019 to “allow sufficient time for a successor to be nominated and confirmed as well as to make sure the Department’s interests are properly articulated and protected.”

On Sunday, Trump ordered Mattis to leave his post atop the Pentagon within nine days. He said Deputy Secretary of Defense Patrick Shanahan, a former executive at Boeing Co., would step into role as acting Pentagon chief on Jan. 1. “Patrick has a long list of accomplishments while serving as Deputy, & previously Boeing,” Trump tweeted in part. “He will be great!”

Mattis couldn’t be reached for comment, but administration officials say he has no intention to make media appearances or interviews about his dismissal. “He doesn’t want to make this process any more difficult than it has to be,” an administration official told TIME.

Trump’s decision to push out Mattis earlier than planned is unlikely to allay the withering criticism raised by both Republicans and Democrats. The response to the resignation within the military and across Washington has been a mix of shock, sorrow and fear.

The President’s move to hasten Mattis out the door also raises new questions. Mattis said in his letter that he wanted to stay on as Defense Secretary in order to attend upcoming events, including “Congressional posture hearings and the NATO Defense Ministerial meeting in February.” Now, he will no longer be required to testify to Congress during the hearings, public events in which he would almost certainly be asked about his decision to resign.

The retired four-star Marine Corps general has spent the last 23 months of his tenure trying to thread the needle between implementing Trump’s policy objectives and maintaining long-standing American principles. But ultimately, it was the abrupt decision to pull out all 2,200 troops fighting ISIS in Syria that pushed Mattis to the breaking point. To Mattis, the decision to pull out without preparation or consultation of allies was abominable.

“One core belief I have always held is that our strength as a nation is inextricably linked to the strength of our unique and comprehensive system of alliances and partnerships,” he said in the resignation letter. “While the U.S. remains the indispensable nation in the free world, we cannot protect our interests or serve that role effectively without maintaining strong alliances and showing respect to those allies.”

Mattis added: “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.

Like Mattis, Shanahan is a Washington state native. He joined the administration after spending more than three decades at Boeing. A mechanical engineer by trade, with two advanced degrees from the Massachusetts Institute of Technology, Shanahan quietly turned around some of Boeing’s most-troubled programs, including a multibillion-dollar missile defense system and the problem-plagued 787 commercial airliner. His success earned him the nickname, “Mr. Fix-It,” inside the company.

At the Pentagon, Shanahan has assumed the role of a technocrat, leading efforts to cut wasteful spending and create a standalone Space Force. He’s maintained a low public profile thus far, and it’s unlikely he’s forged strong ties around Washington like Mattis.

Shanahan, who has relatively little foreign policy experience, assumes the top job at a time of historic change around the world. He’ll have to juggle the continued conflict against terror groups in the Middle East, Russia’s renewed resurgence in Europe and China’s muscular rise in Asia. Even before Trump’s election, there was a litany of other issues putting pressure on the liberal international order that won the Cold War and advanced American interests for a half century.

Shanahan now has a daunting task of navigating this minefield, while simultaneously taking pains to avoid the wrath of an ever-watchful commander-in-chief.

Get our Politics Newsletter. The headlines out of Washington never seem to slow. Subscribe to The D.C. Brief to make sense of what matters most. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Write to W.J. Hennigan at william.hennigan@time.com.