Senators from both parties are asking why they did not have advance notice of the domestic violence incidents in Patrick Shanahan’s family that ended his bid to become President Trump’s permanent defense secretary, calling his nomination’s collapse the latest example of shoddy White House vetting.

“Look what happens when you don’t vet,” Senate Minority Leader Charles E. Schumer (D-N.Y.) told reporters Tuesday. “This Shanahan fiasco shows . . . what a mess the administration’s national security and foreign policy is.”

With his withdrawal and resignation, Shanahan joins several other former candidates for prominent Cabinet and military leadership positions in the Trump administration who bowed out after compromising details came to light. That list includes Trump’s first picks to lead the Army and Navy, and previous nominees to head the departments of Labor and Veterans Affairs.

Most Democrats and Republicans said they were caught completely off guard by news of Shanahan’s withdrawal, which came amid reports that he was involved years ago in an altercation with his now former wife and then, following their divorce, rushed to defend their teenage son after he attacked his mother with a baseball bat. Shanahan denied his ex-wife’s claim that he himself struck her.

There was particular consternation among some senators that Congress was not apprised of the incidents by the administration, the FBI or Shanahan himself. As some lawmakers noted, a background check would have accompanied Shanahan’s nomination in 2017 to become the deputy defense secretary, a post he held until the departure of Trump’s first Pentagon chief, Jim Mattis, in December.

“I don’t understand it,” said Sen. Lisa Murkowski (R-Alaska). “These names, once they are out there, before they get made public, there has been a level of vetting that has gone on — so it does cause you to wonder.”

But while Democrats are calling for a reckoning over the administration’s vetting practices, it is clear that Republican leaders would prefer to simply move on.

“We need to do a better job. If they had the information they should share it,” Sen. Lindsey O. Graham (R-S.C.), a close ally of the president’s, said of the allegations surrounding Shanahan.

Graham quickly added: “That’s over. I appreciate his service, but it’s now time to find somebody else.”

Democrats have called for deeper investigation. Standing beside Schumer on Tuesday, Sen. Richard Blumenthal (D-Conn.), a member of the Senate Armed Services Committee, wondered whether Shanahan’s past “was deliberately concealed or mistakenly covered up.”

“I think there ought to be an investigation by the [inspector general] in the Department of Defense,” he said, contemplating whether Shanahan may have violated the law by failing to disclose to Congress the incidents that were documented in his divorce records.

President Trump has defended his administration’s procedures, telling reporters Tuesday that “we have a very good vetting process.”

Some Republican senators, such as Senate Armed Services Committee Chairman James M. Inhofe (R-Okla.), also have defended the process, dismissing concerns about the omissions on Shanahan’s record.

“There’s so much you can do in a vetting process, and I think, as a general rule, on anything except the No. 1 position, they only go back historically ten years,” Inhofe said. “So I think the vetting process, the process is probably all right.”

Shanahan’s son’s assault on Shanahan’s ex-wife occurred in 2011 — eight years ago. Despite Republican leaders’ stance, some expressed surprise that Shanahan even sought the job, knowing that such an episode was part of his record.

“Frankly, I’m a little surprised he hung in there as long as he did or that he was interested,” said Sen. Kevin Cramer (R-N.D.), a member of the Armed Services panel. “Seeking a position like that, that there was no way that the scrutiny wasn’t going to get to those issues.”

But others dismissed conjecture that the allegations reflect poorly on Shanahan.

“I don’t think that he was the instigator in any of these instances. It sounds like there was somebody else,” said Sen. Joni Ernst (R-Iowa). “I believe he handled it appropriately. Whether that should have come up sooner, I don’t know, because we only know what we know now.”

Several Democrats pointed to a long line of episodes in which Trump’s nominees have withdrawn from consideration for Cabinet posts, assistant secretaryships and federal judgeships after compromising personal or professional details emerged. Notable examples include Mark Green, who withdrew from consideration to become Army secretary in 2017 over his past comments about Islam, evolution and LGBT issues; and Philip Bilden, Trump’s pick for Navy secretary in the same year, who withdrew over financial concerns. Last year, Ronny L. Jackson withdrew from consideration to become VA secretary over allegations of professional misconduct, while two nominees — Andrew Puzder for labor secretary and Heather Nauert for U.S. ambassador to the United Nations — withdrew their bids over legal-documentation issues related to immigrant household employees since Trump took office.

“There ought to be a complete investigation of that whole process,” Blumenthal said, noting that lawmakers were concerned about the White House but also needed to have faith that the FBI vetting process was “not only credible but also effective and penetrating.”

Senators also have to be sure “that the FBI has no fear about asking for information that may reflect badly on a potential nominee,” Blumenthal said. “They can’t be intimidated from finding bad news.”

Shanahan’s withdrawal means that Mark Esper, the current Army secretary, takes over as acting defense secretary, and both Democrats and Republicans said Tuesday they hope he will become Trump’s nominee.

“When you have the word ‘acting’ after your name, you’re not it, and you’re perceived by other countries as not the person in charge, and that’s a problem,” said Inhofe, who spoke with Trump by phone Tuesday. Trump did not commit to nominating Esper during that conversation, he said.

“At a time when we face critical national security and budgetary challenges, it is imperative that we have a confirmed civilian leader atop the Pentagon who is accountable to the President, Congress, and the American people,” Sen. Jack Reed (R.I.), the ranking Democrat on the Senate Armed Services Committee, said in a statement.

House Armed Services Committee Chairman Adam Smith (D-Wash.) also weighed in on Esper, saying in a statement that “the Department would benefit from his leadership.”

Erica Werner contributed to this report.