Getty Images
Now playing
02:40
Castro and O'Rourke's head-on clash over immigration
U.S. President Joe Biden speaks from the Treaty Room in the White House about the withdrawal of U.S. troops from Afghanistan on April 14, 2021 in Washington, DC. President Biden announced his plans to pull all remaining U.S. troops out of Afghanistan by September 11, 2021 in a final step towards ending America's longest war.
Andrew Harnik/Pool/Getty Images
U.S. President Joe Biden speaks from the Treaty Room in the White House about the withdrawal of U.S. troops from Afghanistan on April 14, 2021 in Washington, DC. President Biden announced his plans to pull all remaining U.S. troops out of Afghanistan by September 11, 2021 in a final step towards ending America's longest war.
Now playing
01:03
Biden: It's time to end the forever war
Kinzinger
CNN
Kinzinger
Now playing
05:56
What Republican lawmaker fears after US troops leave Afghanistan
CNN
Now playing
02:45
Sen. Bernie Sanders: Trump was right about this
Rep. Matt Gaetz, R-Fla., questions witnesses during a House Armed Services Committee hearing on Capitol Hill, Wednesday, April 14, 2021, in Washington.
Manuel Balce Ceneta/AP
Rep. Matt Gaetz, R-Fla., questions witnesses during a House Armed Services Committee hearing on Capitol Hill, Wednesday, April 14, 2021, in Washington.
Now playing
02:59
Women detail late-night parties with Gaetz
One shot doses of the Johnson & Johnson COVID-19 vaccine are prepared at a clinic targeting immigrant community members on March 25, 2021 in Los Angeles, California.  The clinic, run by the St. John's Well Child and Family Center, estimates it has vaccinated more than 100,000 people in the Los Angeles area amid reports of two undocumented women who were refused coronavirus vaccinations in Orange County Rite Aid stores. Rite Aid has called the refusals mistakes in a written statement.  (Photo by Mario Tama/Getty Images)
Mario Tama/Getty Images
One shot doses of the Johnson & Johnson COVID-19 vaccine are prepared at a clinic targeting immigrant community members on March 25, 2021 in Los Angeles, California. The clinic, run by the St. John's Well Child and Family Center, estimates it has vaccinated more than 100,000 people in the Los Angeles area amid reports of two undocumented women who were refused coronavirus vaccinations in Orange County Rite Aid stores. Rite Aid has called the refusals mistakes in a written statement. (Photo by Mario Tama/Getty Images)
Now playing
02:48
These unlikely events are still more likely than a blood clot after the J&J vaccine
U.S. Marines conduct an operation to clear a village of Taliban fighters in July 2009 in Mian Poshteh, Afghanistan.
Joe Raedle/Getty Images
U.S. Marines conduct an operation to clear a village of Taliban fighters in July 2009 in Mian Poshteh, Afghanistan.
Now playing
03:19
Biden to announce Afghanistan withdrawal by September 11
roger wicker
CNN
roger wicker
Now playing
04:52
Sen. Wicker on Biden's infrastructure plan: Not ruling out tax hike
Representative Matt Gaetz (R-FL) arrives for a House Armed Services Subcommittee hearing with members of the Fort Hood Independent Review Committee on Capitol Hill on December 9, 2020 in Washington, DC.
Samuel Corum/Getty Images
Representative Matt Gaetz (R-FL) arrives for a House Armed Services Subcommittee hearing with members of the Fort Hood Independent Review Committee on Capitol Hill on December 9, 2020 in Washington, DC.
Now playing
03:02
Sources say Gaetz was denied meeting with Trump
CNN
Now playing
07:27
CNN anchor pushes back on Texas state lawmaker's defense of voting bill
CNN
Now playing
01:12
Tapper asks Buttigieg for infrastructure plan timeline
Now playing
02:48
GOP governor calls Trump's RNC remarks 'divisive'
WASHINGTON, D.C. - APRIL 19, 2018:  The U.S. Supreme Court Building in Washington, D.C., is the seat of the Supreme Court of the United States and the Judicial Branch of government. (Photo by Robert Alexander/Getty Images)
Robert Alexander/Getty Images
WASHINGTON, D.C. - APRIL 19, 2018: The U.S. Supreme Court Building in Washington, D.C., is the seat of the Supreme Court of the United States and the Judicial Branch of government. (Photo by Robert Alexander/Getty Images)
Now playing
02:39
SCOTUS blocks California Covid restriction on religious activities
rep jim clyburn georgia voting law jim crow sot sotu vpx_00000000.png
rep jim clyburn georgia voting law jim crow sot sotu vpx_00000000.png
Now playing
02:13
Rep. Clyburn blasts GA voting law: It's the 'new Jim Crow'
Gaetz speaks to members of the media outside the hearing Michael Cohen, former attorney and fixer for President Donald Trump, testifies at before the House Committee on Oversight and Reform at Rayburn House Office Building February 27, 2019 on Capitol Hill in Washington, DC. Last year Cohen was sentenced to three years in prison and ordered to pay a $50,000 fine for tax evasion, making false statements to a financial institution, unlawful excessive campaign contributions and lying to Congress as part of special counsel Robert Mueller's investigation into Russian meddling in the 2016 presidential elections.
Alex Wong/Getty Images
Gaetz speaks to members of the media outside the hearing Michael Cohen, former attorney and fixer for President Donald Trump, testifies at before the House Committee on Oversight and Reform at Rayburn House Office Building February 27, 2019 on Capitol Hill in Washington, DC. Last year Cohen was sentenced to three years in prison and ordered to pay a $50,000 fine for tax evasion, making false statements to a financial institution, unlawful excessive campaign contributions and lying to Congress as part of special counsel Robert Mueller's investigation into Russian meddling in the 2016 presidential elections.
Now playing
06:11
'Bombastic, antagonistic, unapologetic': A look at Gaetz's political career
Former House Speaker John Boehner attends a ceremony to unveil a portrait of himself on Capitol Hill, Tuesday, Nov. 19, 2019 in Washington.
Michael A. McCoy/AP
Former House Speaker John Boehner attends a ceremony to unveil a portrait of himself on Capitol Hill, Tuesday, Nov. 19, 2019 in Washington.
Now playing
02:42
Boehner says Republican colleague held 10-inch knife to his throat outside House floor
(CNN) —  

Julián Castro and Beto O’Rourke, two relatively young Democrats from Texas, have been circling each other for months as both vie to propel themselves out of the Lone Star state.

And on Wednesday, those months came to a head: Castro and O’Rourke fought in arguably the most heated exchange of an otherwise mild Democratic debate over immigration, an issue both candidates view as central to their campaigns.

Underneath the back-and-forth was the personal relationship between the two Texans. Although they have worked together in the past – and Castro campaigned for O’Rourke when he ran for Senate in 2018 – it appeared to many in the state that the El Paso congressman had eclipsed Castro as the state’s pre-eminent Democrat during that run against Republican Sen. Ted Cruz.

Castro famously keynoted the 2012 Democratic National Convention, earning plaudits that cast him as Texas’ rising star and possibly the next President Barack Obama. But O’Rourke, with an upstart Senate run, became a national Democratic icon in 2018, taking that mantle from Castro and earning the support of many of the same people that launched Obama.

“They’re friendly but clearly competitive,” said a Castro aide after their back-and-forth on stage. Asked what happened to a once closer relationship, the aide added: “Ambition.”

Castro opened the immigration section of the debate by highlighting that he released an immigration plan in April – the first of the 2020 candidates – that centered on repealing Section 1325 of the Immigration and Nationality Act, which was used by the George W. Bush administration to apply a criminal violation – as opposed to a civil infraction – to anyone entering the United States illegally.

The decades-old law was used by the Bush administration to attempt to curb the number of illegal entrances into the United States, something that Castro said needs to be repealed.

“Let’s be very clear, the reason that they are separating these little children from their families is that they are using section 1325 of that act, which criminalized crossing over the border, to incarcerate the parents and then separate them,” Castro said.

“Some of us on this stage have called to end that section, to terminate it, some, like Congressman O’Rourke, have not,” Castro said, turning and gesturing towards the congressman.

With both candidates on the screen, O’Rourke quickly moved to respond but Castro talked over him.

“And I want to challenge all of the candidates to do that. I just think it is a mistake, Beto, and I think if you truly want to change the system then we have to repeal that section. “

O’Rourke, turning to Castro, got in his response: “Actually, as a member of Congress, I helped to introduce legislation that would ensure we don’t criminalize those who are seeking asylum and refuge in this country.”

Castro was not talking about asylum seekers, however, a point he made clear to the former congressman.

“You are looking at just one small part of this,” O’Rourke said. “I am talking about a comprehensive re-write of our immigration laws.”

“That’s not true. That is actually not true,” Castro said, looking at O’Rourke and adding that the congressman recently told CNN that he did not think the law should be repealed because of the way he believes it would hurt the fight against drug and human trafficking.

But what Castro noted is that there are other codes in the same law that focus on trafficking.

And then, as the conversation came to an end and as others talked over him, Castro delivered his hardest blow at O’Rourke: “I think you should do your homework on this issue, if you did your homework on this issue you would know we should repeal this section.”

Both candidates in split screen for most of the exchange and the moderators left them continually go at it.

But Castro was not done.

In an interview with CNN after the debate, Castro made his point clear: “The thing about Congressman O’Rourke is that he clearly hasn’t done his homework.”

“He is claiming a couple of days ago that we need to keep that law in place because we need to protect the country from human traffickers or drug traffickers,” Castro said. “I pointed out that we have other laws that specifically relate to people who engage in drug trafficking or human trafficking. And the only way that we’re going to end family separations is if we get rid of that law.”

He later told CNN’s Anderson Cooper that O’Rourke “failed” on immigration policy.

O’Rourke responded to Castro in the spin room after the debate.

“I think we have the same goal. I think he’s got it wrong on how he describes my position. I’m focused on the big picture: making sure our laws reflect our values, our interests, and what we know to be right in this country of immigrants, asylum-seekers and refugees,” O’Rourke said.

And on Castro saying that he hasn’t done his homework, O’Rourke responded: “Well, he’s wrong on this one.”

On CNN’s “New Day” Thursday, O’Rourke added that “no one has worked harder to end the practice of family separation” and said it’s Castro who’s “wrong on his characterization of family separation.”

Asked if he felt he was the target of his fellow candidates on stage, O’Rourke said, “I sure did. That’s part of politics and part of the debate.”

“I felt like my responsibility was to describe my vision for the country … Others had a different strategy. One that involved attacking other candidates,” said O’Rourke, who added that he was “pleased” with his debate performance.

CNN’s Veronica Stracqualursi contributed to this report.