The issues of race and inequality have drawn some of the starkest dividing lines of the sprawling Democratic presidential primary race, escalating into repeated confrontations between former Vice President Joseph R. Biden Jr. and the two leading black candidates, Senators Kamala Harris and Cory Booker.

During the debate on Wednesday, the escalating confrontation between Mr. Booker, of New Jersey, and Mr. Biden on their respective criminal justice records erupted into one of the tensest clashes of the night.

Booker: Mr. Vice President has said that since the 1970s, every crime bill, major and minor, has had his name on it. And sir, those are your words, not mine, and this is one of those instances where the house was set on fire and you claimed responsibility for those laws. And you can’t just now come out with a plan to put out that fire. We have got to have far more bold action on criminal justice reform, like having true marijuana justice. Which means that we legalize it on a federal level and reinvest the profits in communities that have been disproportionately targeted by marijuana enforcement.

In recent weeks, Mr. Booker has been increasingly aggressive in his critiques of Mr. Biden’s criminal justice plan, highlighting the former vice president’s role in the 1994 crime bill, which experts have linked to mass incarceration, and calling Mr. Biden “the proud architect of a failed system.” Mr. Booker was also among the first candidates to criticize Mr. Biden’s warm remarks about working with segregationists in the Senate.

Mr. Biden was quick to fire back on Wednesday, focusing on the troubles plaguing the Newark Police Department during Mr. Booker’s tenure as mayor of that city.

Biden: The fact is that the bills that the president, excuse me, the future president here, that the senator is talking about, are bills that were passed years ago and passed overwhelmingly. Since 2007, I, for example, tried to get the crack powder cocaine disparity totally eliminated. In 2007, you became mayor, and you had a police department that was, you went out and hired Rudy Giuliani’s guy and you engaged in stop and frisk. You had 75 percent of those stops reviewed as illegal. You found yourself in a situation where three times as many African-Americans were caught in that chain and caught up. The Justice Department came after you for saying you were engaging in behavior that was inappropriate, and then in fact nothing happened. The entire time you were mayor.

This month, Mr. Biden’s campaign released a statement making similarly critical points of Mr. Booker’s stewardship of the Police Department. The department, in a city plagued by poverty and crime for decades, had long grappled with issues like underfunding and corruption. But Mr. Booker, who took office as mayor in 2006, pledged a zero-tolerance policy towards crime.

The two candidates continued in an exchange that grew increasingly tense.

Booker: It’s no secret that I inherited a criminal police department with massive problems and decades-long challenges. But the head of the A.C.L.U. has already said, the head of the New Jersey A.C.L.U., that I put forth national standards setting accountability. Mr. Vice President, I didn’t interrupt you, please show me that respect, sir. We have a system right now that’s broken. And if you want to compare records, and frankly I’m shocked that you do, I’m happy to do that. Because all the problems that he is talking about that he created, I actually led the bill that got passed into law that reverses the damage that your bills that you were bragging, calling it the Biden crime bill up until 2015. Biden: No. 1, the bill he talks about is a bill that in our administration we passed. We passed the bill you added onto, that’s the bill in fact you passed. And the fact of the matter is, secondly, there is nothing done for the entire eight years he was mayor, there was nothing done to deal with the police department that was corrupt. Why did you announce on the first day a zero-tolerance policy of stop and frisk and hire Rudy Giuliani’s guy in 2007 when I was trying to get rid of the crack cocaine disparity. Booker: Mr. Vice President, there’s a saying in my community that you’re dipping into the Kool-Aid and you don’t even know the flavor. You need to come to the city of Newark and see the reforms we put in place. The New Jersey head of the A.C.L.U. has said that I embraced reform not just in action but in deeds. You are trying to shift the view from what you created. There are people right now in prison for life, for drug offenses because you stood up and used that tough on crime phony rhetoric that got a lot of people elected but destroyed communities like mine. This isn’t about the past, sir. This is about the present right now. I believe in redemption, I’m happy you’ve evolved, but you have offered no redemption to the people in prison right now.

Mr. Booker’s criticisms of Mr. Biden’s record come as the New Jersey senator has been angling for a breakthrough moment, particularly after watching Ms. Harris, of California, draw attention for weeks for her criticism of the former vice president over busing during the first debate in June.