The Democrats seeking to thwart President Trump's reelection bid next year sought to draw stark contrasts with his administration's hardline immigration agenda during the third Democratic presidential debate in Houston.

The first White House hopeful to be asked about the issue during the debate hosted by ABC News on Thursday night was Joe Biden. Jorge Ramos, the longtime anchor at the Spanish-language television network Univision, pressed the former vice president on the high number of deportations of undocumented immigrants during the Obama administration.

"Are you prepared to say tonight that you and President Obama made a mistake about deportations," Ramos asked. "Why should Latinos trust you?"

Get updates from the campaign trail delivered to your inbox

Biden largely demurred, pointing instead to his opposition to Mr. Trump's stringent immigration policies. "Comparing this president to the president we have is outrageous," he countered. "Number one, we didn't lock people up in cages. We didn't separate families."

Biden stressed that he's proud to have served under Mr. Obama, noting that their administration created the Deferred Action for Childhood Arrivals (DACA) program to shield young undocumented immigrants from deportation and supported efforts to pass comprehensive immigration reform that ultimately collapsed in Congress.

Biden also said he would, if elected, roll back restrictions the Trump administration has imposed on migrants trying to seek asylum in the U.S. But Ramos reminded the former vice president that he had not answered the question of whether the Obama administration should have deported so many people.

"The president did the best thing that was able to be done at the time," Biden said, referring to Mr. Obama.

Former Texas Rep. Beto O'Rourke, left, listens as former Housing and Urban Development Secretary Julián Castro, right, responds to a question Thursday, Sept. 12, 2019, during a Democratic presidential primary debate hosted by ABC at Texas Southern University in Houston. AP

Ramos then turned to Mr. Obama's second Housing Secretary Julián Castro, who wasted not time to go after Biden. Castro said he agreed with Biden that Mr. Obama was a very different president than Mr. Trump, whom he said has a "dark heart" when it comes to immigration.

But he quickly noted that he had a "problem" with the former vice president, renewing a feud between the two Obama-era officials that was also on display during the second debate in Detroit. Castro accused Biden of picking and choosing which Obama-era polices to embrace and which ones to distance himself from.

"He wants to take credit for Obama's work but not have to answer any questions," Castro said of Biden.

Outlining his own agenda on immigration, Castro said he would not use the DACA program as leverage to garner Republican support for legislation to place undocumented immigrants on a pathway to U.S. citizenship, saying he's sure that Democrats will not only capture White House in 2020, but also elect a majority in Senate, currently controlled by Republicans.

Democratic presidential candidate former Vice President Joe Biden answers a question as Sen. Elizabeth Warren, D-Mass., reacts Thursday, Sept. 12, 2019, during a Democratic presidential primary debate hosted by ABC at Texas Southern University in Houston. AP

Asked about her platform, Elizabeth Warren vowed to overhaul the nation's immigration system and to tackle the root causes of migration from Central America by trying to curtail the rampant crime and suffocating poverty in many areas there. Warren also said Democrats need to gain the initiative on the issue, which she suggested Mr. Trump has weaponized to galvanize his most ardent supporters.

"We have a crisis that Donald Trump has created and hopes to profit from politically," she added. "We have to have the courage to stand up and fight back."