Elizabeth Warren and Bernie Sanders clashed with Joe Biden on health care at the third presidential debate Thursday as lower-profile candidates tried to knock the front-runner from his perch.

The former vice president said the progressive senators are turning their back on the legacy of former President Barack Obama by wanting to replace the Affordable Care Act with a single-payer "Medicare for All" plan.

"I know the senator says she's for Bernie. Well I'm for Barack," Biden said of Warren at the start of the debate, while adding that Sanders wasn't being "honest" about how he would pay for his plan.

It was the first time the leading 10 candidates appeared on stage together, after two earlier debates this summer that had to be held over two nights to accommodate all 20 candidates.

Those events did little to dislodge Biden from the top of the polls, but the large field of candidates has begun to winnow and voters are increasingly tuning in to the race, so challengers hoped to shake things up in Houston at the ABC-sponsored debate.

The front-runners — Biden, Sanders and Warren — approached the third debate more cautiously, not wanting to risk their position, leaving room for other candidates to step forward,and they showed little deference to the former vice president.

Meanwhile, President Donald Trump, speaking to Republican lawmakers in Baltimore, said he had attacked Warren too early in the process.

"I thought she was gone," the president said. "She's emerged from the ashes, and now it looks like she could beat Sleepy Joe."

Former Housing Secretary Julián Castro attacked Biden personally, suggesting the 76-year-old was losing his memory and forgetting what he had just said moments earlier. And he argued a young person of color like him is the true heir of the Obama legacy.

"I'm fulfilling the legacy of Barack Obama and you're not," Castro said to mixed reaction from the crowd. "He wants to take credit for Obama's work without having to answer any questions."

Others tried to interject and urge unity, with Mayor Pete Buttigieg of South Bend, Indiana, warning the debate was becoming "unwatchable" because of the arguing and attacks.

"That's called an election!" Castro shot back.

The candidates had a more substantive discussion on guns, health care and foreign policy.

Sanders, whose voice was noticeably hoarse, launched a fervent if familiar defense of Medicare for All, while Warren tried to thread the needle by saying her plan is the best way to expand Obamacare.

"We all owe a huge debt (to Obama)," Warren said, arguing people wouldn't miss their insurer. "I've never actually met anybody who likes their insurance company. I've met people who like their doctor. ... The only difference here is where to send the bill."

The rest of the stage, including California Sen. Kamala Harris, who has supported Medicare for All, warned Sanders' and Warren's plan would kick over 100 million Americans off their health insurance plans in favor of a government-run program.

Buttigieg called that plan "my way or the highway," and said Sanders and Warren don't "trust the American people."

On guns, several candidates suggested Biden's approach was too cautious.

"Hey, Joe, instead of saying, 'No, we can't,' let's say, 'Yes, we can,'" Harris said, quoting Obama's campaign slogan.

Biden said he was the only candidate on stage to have beaten the National Rifle Association, referring to the passage of the Assault Weapon Ban in 1994, but said the executive action that Harris and others favor would not stand up in court.

After weaker performances in the past, former Texas Rep. Beto O'Rourke stood out on guns and received praise from his rivals for his conduct after a mass shooting this summer in his native El Paso.

"Hell, yes, we're going to take your AR-15, your AK-47," O'Rourke said to cheers of his mandatory gun buyback plan. "And we're not going to allow them to be used against other Americans anymore."

But New Jersey Sen. Cory Booker suggested O'Rourke was late to the issue and embraced programs that Booker champions, like national gun licensing, only after violence touched his hometown. "It is time for a movement on this issue, and I will lead it," Booker said.

Later, Sanders and Biden sparred briefly on foreign policy after Biden acknowledged that he "never" should have voted to give President George W. Bush authority to invade Iraq.

But Sanders said that hindsight wasn't good enough. "One of the big differences between you and me — I never believed what Cheney and Bush said," Sanders replied. "I voted against the war in Iraq and helped lead the opposition."

Otherwise, the candidates rarely attacked one another and mostly used the stage as a platform to promote their own plans and deliver their own talking points — and jokes.

Harris said Trump was like "The Wizard of Oz," because "when you pull back the curtain, it’s a really small dude."

Entrepreneur Andrew Yang, who announced onstage that he would be giving away $1,000 a month to 10 random people for a year as a pilot of his Universal Basic Income plan, quipped that he understands health care because, "I'm Asian, so I know a lot of doctors."

And Klobuchar warned about the danger of climate change by saying: "You know that movie, 'The Day After Tomorrow'? It's today."

Eight other candidates did not qualify for this debate, but will have another shot to make the one next month in Ohio.