News of Defense Secretary Jim Mattis' impending departure shook an already tense Capitol on Thursday night, with lawmakers from both parties reacting with concern over what Mattis' departure means for the Trump administration and the international community.

In a letter announcing his resignation, Mattis implicitly criticized President Donald Trump's military judgment, suggested the president was not treating allies with respect, and had not been "clear-eyed" about those who would do the U.S. harm.

He then told Trump that the president had the right to have a defense chief who shares his views. Mattis said he would depart at the end of February.

Sen. Mark Warner of Virginia, the top Democrat on the Senate Intelligence Committee, called Mattis "an island of stability amidst the chaos of the Trump administration."

"This is scary," Warner tweeted.

Sen. Chris Murphy, D-Conn., called it a "national security crisis."

"A Secretary of Defense quitting over a public disagreement with a President whose foreign policy he believes has gone off the rails is a national security crisis," Murphy tweeted, calling it a "morale crisis at the Department of Defense right now" after the news of Mattis' resignation and Trump's decision to withdraw U.S. troops from Syria, announced just a day earlier.

Republicans were also unbridled in voicing their concern Thursday night. Rep. Adam Kinzinger of Illinois, quote-tweeting the president's announcement about Mattis, said: "That’s what happens when you ignore sound military advice."

Sen. Ben Sasse, R-Neb., said in a statement, "This is a sad day for America because Secretary Mattis was giving advice the President needs to hear."

Trump announced Mattis' departure on Twitter, portraying it as a retirement. Sen. Marco Rubio, R-Fla., took a sanguine view, saying he hoped his "decision to resign was motivated solely by a desire to enjoy a well deserved retirement."

That sentiment was quickly replaced, however, after Rubio read Mattis' letter — which did not include any praises or compliments of the president and implicitly criticized Trump's military judgment.

To Rubio, the letter "makes it abundantly clear that we are headed towards a series of grave policy errors which will endanger our nation, damage our alliances & empower our adversaries." He also pressed for more oversight of the executive branch by Congress.

Sen. Lindsey Graham, R-S.C., praised Mattis earlier in the day, noting disagreement between the president and the Pentagon chief over Trump's recently announced decision to withdraw U.S. troops from Syria. Though usually one of Trump's staunchest defenders, Graham has been vocal in his opposition to the move.

Mattis "thought that the time was not right to leave [Syria], for all the reasons just expressed. Secretary Mattis is one of the most seasoned national security people I know, he's got a great team around him, the president does. He just has to listen," Graham said in a news conference.

After the news of his impending departure broke, Graham tweeted: "It is with great sadness that I was informed of the resignation of General Mattis."

Senate Majority Leader Mitch McConnell, R-Ky., in a statement seemed to echo some of Mattis’ comments about alliances in the letter.

"I believe it’s essential that the United States maintain and strengthen the post-World War II alliances that have been carefully built by leaders in both parties," McConnell said. "We must also maintain a clear-eyed understanding of our friends and foes, and recognize that nations like Russia are among the latter."