Ten candidates vying to become the Democratic nominee for US president have taken part in the latest televised debate.

Front runner Joe Biden came under attack for his record on immigration, criminal justice reform and racial equality.

But the former vice president fought back against a stage full of rivals eager to knock him off his perch during a contentious debate.

On the second of back-to-back nights of debates among Democrats vying to challenge Republican President Donald Trump in 2020, Mr Biden came prepared to do battle after facing criticism for his sometimes wobbly performance in the first debate in Miami last month.

Striking a sharper and more aggressive tone, he tangled with rival Kamala Harris over healthcare, taking up a growing fight that has split the Democratic Party and dominated the first candidate encounter in Detroit on Tuesday.

He ridiculed Ms Harris' contention that the US senator's recently unveiled healthcare plan would not require a middle-class tax increase or the elimination of private insurance plans.

"You can't beat President Trump with double-talk on this plan," Mr Biden told her.

"The plan no matter how you cut it costs $3 trillion. It will require middle-class taxes to go up, not down. Thirdly, it will eliminate employer-based insurance."

Ms Harris rejected Mr Biden's description as "simply inaccurate" and ripped into his proposal to build on former President Barack Obama's signature healthcare law, and include a government-run option, saying it would leave millions uninsured.

"In 2019 in America for a Democrat to be running for president with a plan that does not cover everyone, I think is without excuse," said Ms Harris.

Mr Biden called criticism of his plan "a bunch of malarkey."

Read More:
Healthcare, immigration dominate US Democrat debate
Trump denies racist strategy but is heckled for 'hate' 

Democrats have made access to affordable healthcare one of their defining issues as the Trump administration has worked to chip away at Obamacare.

Mr Biden also tangled with US Senator Cory Booker, who renewed his criticism of Mr Biden's work as a senator on the 1994 crime bill, which critics say led to the disproportionate imprisonment of African-American men.

"There are people right now in prison for life for drug offences because you stood up and used that "tough on crime" phony rhetoric that got a lot of people elected," Mr Booker told Mr Biden.

In response, Mr Biden attacked Mr Booker's tenure as mayor of Newark, New Jersey, where he led a police department that became embroiled in a federal civil rights investigation.

In an exchange with Julian Castro, the former housing secretary under Mr Obama, Mr Biden criticised Mr Castro's plan to decriminalise illegal border crossings.

"If you cross the border illegally, you should be able to be sent back. It's a crime," said Mr Biden, who was interrupted by protesters shouting about deportations under the Obama administration.

Mr Castro, the former mayor of San Antonio, retorted: "It looks like one of us has learned from the lessons of the past and one of us hasn't."

After a debate on Tuesday that featured progressive leaders Bernie Sanders and Elizabeth Warren defending their policies against criticism from more moderate rivals, the encounter last night focused more often on criticism of Mr Trump and the best route to challenging him in 2020.

But there were still plenty of fireworks among the Democratic contenders.

Ms Harris came under heavy attack from her rivals, an acknowledgment of her rise into the top tier of the Democratic field of about two dozen presidential candidates.

Seeking to make a distinction with Mr Trump, who has been widely criticised for attacks on minority US lawmakers, Mr Biden celebrated the diversity on the debate stage.

"Mr President, this is America, and we are strong and great because of this diversity, Mr President, not in spite of it," he said.

"Let's get something straight, we love it, we're not leaving it, we're here to stay and we’re certainly not leaving it here to you," said Mr Biden.

Mr Trump raised a firestorm this month when he tweeted that four progressive Democratic congresswomen should "go back" to where they came from, even though all are US citizens and three are US-born.

But Mr Biden faced renewed criticism from Ms Harris for working with segregationists while serving in the US Senate decades ago.

"Had those segregationists had their way, I would not be a member of the United States Senate, Cory Booker would not be a member of the United States Senate and Barack Obama would not have been in a position to nominate him to the place he holds," she said.

Mr Biden responded with a shot at Ms Harris' record as California's top law enforcement officer.

"When Senator Harris was the attorney general for eight years in the state of California, there were two of the most segregated school districts in the country, in Los Angeles and in San Francisco," he said.

"I didn’t see a single solitary times he brought a case against them to desegregate."

The debates come about six months before Iowa holds the first nominating contest, and the two nights in Detroit could be the last chance for many of the lower-tier contenders to make an appearance on the national debate stage.

The Democratic National Committee will double its fundraising and polling requirements to qualify for the next debates in September and October, leaving out more candidates and raising questions about their ability to continue their campaigns.

So far, only about a third of the field has met the qualifications. Several of the candidates used their closing statements to plead for more donations so they could make the debate.