Former Vice President Joe Biden and Sen. Kamala Harris took the brunt of the attacks during a raucous and rapid-fire Democratic presidential primary debate that featured confrontations over health care, immigration, criminal justice, racial issues and how best to confront President Trump.

The Wednesday evening debate was especially important for Mr. Biden, who sought to prove he has the vigor and vision to be the party’s nominee following a shaky performance a month earlier that raised questions about the strength of his candidacy.

In the early segments of the debate in Detroit, the former vice president stammered several times. But his performance, which grew stronger throughout the night, may help silence some questions about his viability as a potential nominee and chief foil of Mr. Trump.

The session was the most combative of four debates held so far, two this week and two a month earlier. It exposed deep divisions among the candidates over how far the federal government should reach into the lives of Americans.

Mr. Biden faced repeated attacks over his record serving under former President Obama.