MIAMI — Joe Biden, Bernie Sanders and eight other candidates tore into President Donald Trump on Thursday night at the first Democratic presidential debate, but they also clashed sharply with one another over race, health care and "socialism."

Sanders blasted Trump as "a pathological liar and a racist," saying the best way to beat him is to "expose him for the fraud he is," while Biden said Trump equates "racists and white supremacists with decent people" and sides with dictators.

"One of the worst things that President Trump has done to this country is he's torn apart the moral fabric of who we are," said Sen. Kirsten Gillibrand of New York.

The 10 candidates who appeared on stage Thursday struck a much sharper tone than the first slate of candidates who debated Wednesday night. And they were not only more aggressive against Trump, but with each other.

Biden, the front-runner in every poll of the sprawling 2020 field, took plenty of incoming fire on a wide range of issues — but none rawer than race.

It started with Mayor Pete Buttigieg of South Bend, Indiana, who acknowledged he hasn't been able to heal racial divisions in his city, which recently exploded after a white police officer shot and killed a black man. "I couldn't get it done," Buttigieg acknowledged, while detailing what he had done to improve police accountability and race relations, but saying more work is ahead.

Then Sen. Kamala Harris of California jumped in.

"As the only black person on stage, I would like to speak on the issue of race," Harris began, before unloading on Biden for recently touting how he was able to work with two segregationist senators — who opposed busing — in the Senate decades ago and noting she and every black man she knows has been affected by racism.

There was a little girl in California who was bussed to school. That little girl was me. #DemDebate pic.twitter.com/XKm2xP1MDH — Kamala Harris (@KamalaHarris) June 28, 2019

"It was personal ... actually, it was hurtful," Harris a former prosecutor, said while casting a steely gaze at Biden.

The former vice president first defended himself: "She mischaracterized my position across the board." Then fired back: "I was a public defender, I did not become a prosecutor." He went on to tout his civil rights record in the Senate.

But Harris did not back down, pressing Biden to apologize for his past opposition to busing to integrate schools, which he declined to do — before awkwardly cutting himself off when he exhausted his allotted time. “My time's up. I'm sorry."

For full coverage visit NBC News Debate HQ and download the NBC News app

The candidates also clashed on health care.

Sanders and Harris were the only candidates to say they would be willing to eliminate private insurance to replace it with a government-run single-payer plan.

Sanders acknowledged that he would raise taxes on the middle class, but said it was worth it and that the wealthy and corporations would bear the brunt of new taxes to fund his expansion of the social welfare state plans.

"Yes, they will pay more in taxes, but they will pay less for health care than what they get now," Sanders said of the middle class.

Biden, who often speaks of his time in the Obama White House, took an implicit shot at Harris and Sanders. "I'm against any Democrat who wants to take down Obamacare," he said.

All eyes were on Biden heading into the debate, but it was little-known Rep. Eric Swalwell of California who took the first big swing at the field's leader.

Swalwell brought up a speech Biden gave decades ago in which he called on the older generation of leaders to pass the torch to a younger one.

"Joe Biden was right when he said we need to pass the torch," Swalwell said, drawing howls and shouts from the debate audience.

"I’m still holding onto that torch," Biden, 76, responded, before arguing his experience would help him implement the policies many of them agree on. "We all talk about these things. I did it."

Even Sen. Michael Bennet of Colorado, a moderate generally aligned with Biden on policy, joined the pile on.

He said Biden as vice president cut "a terrible deal" with Senate Majority Leader Mitch McConnell to raise the debt ceiling, going after Biden's core strength — his purported ability to negotiate with Republicans.

But in a sign of how far the Democratic Party has moved to the left on immigration, most of the candidates' hands, including Biden's, went up when asked if they would support decriminalizing unauthorized border crossings.

And most of them said they provide health care coverage to undocumented immigrants, which the Affordable Care Act does not.

"You cannot let people who are sick — no matter where they came from, no matter their status — go uncovered. … It's not humane," Biden said.

The candidates slammed Trump for the crackdown on migrants, with former Colorado Gov. John Hickenlooper saying the administration's family separation policy amounted to "kidnapping."

"For a party that associates itself with Christianity to say it is OK to suggest that God would smile on the division of families at the hands of federal agents, that God would condone putting children in cages, has lost all claim to ever use religious language," said Buttigieg, who often speaks about his own faith.

And some candidates said they would not deport migrants for unauthorized border crossing alone.

When the conversation turned to foreign policy, several candidates said China was the primary geopolitical rival to the United States, but entrepreneur Andrew Yang said it was the Russians, who are "laughing their asses off" after interfering in the 2016 election to help Trump.

Self-help writer Marianne Williamson said that Trump has "harnessed fear" to promote his agenda and that the only way to fight him would be to "harness love," which is what she intends to do.

Hickenlooper warned that the party's leftward drift would be disastrous for not just the party, but the country. "If we turn towards socialism, we run the risk of helping to re-elect the worst president in American history," he said.

The Thursday night faceoff comes after the first night of the debate on Wednesday, which also 10 candidates, including Sens. Elizabeth Warren and Cory Booker, and former Housing Secretary Julián Castro.