Former Housing and Urban Development Secretary Julián Castro explained Thursday why he challenged former Rep. Beto O'Rourke on his immigration platform during a pointed exchange of the first 2020 Democratic debate.

Castro took on O’Rourke, a fellow Texan, during Wednesday night’s debate over the issue of decriminalizing border crossings. Castro has called for the repeal of Section 1325 of the Immigration and Nationality Act, a part of federal law that criminalizes unlawful entry into the United States, while O’Rourke has previously said he did not think it should be repealed.

“This is the exact law that has allowed this administration to incarcerate the parents and then separate them from children and I called for the elimination of it,” Castro said Thursday morning on MSNBC’s “Morning Joe.” “I just wanted to point out that if you’re not calling for the repeal of the section, that means that basically you’re going to keep the status quo and you’re going to allow family separation.”

“We have this disagreement on the most important aspect of immigration policy that would make sure, guarantee that we end family separations,” he added. “I wanted to make clear not just for Beto but as you recall, I challenged every other candidate in this race to join me on the repeal of Section 1325.”

Meanwhile, when asked about other candidates targeting him on the debate stage, O'Rourke said on "Morning Joe" that he was not "running against anybody, I'm running for the United States of America."

"I understand other folks had other strategies and other goals during that debate," he said.

Download the NBC News app for full coverage as Biden, Sanders, Harris and Buttigieg face off Thursday from 9 p.m. ET

O'Rourke went on to list key parts of his immigration platform, including "ending family separation, stopping the practice of putting kids in cages" and ensuring there would be "accountability for the children who have died within our custody."

"That’s what this country of immigrants and asylum-seekers should be able to do and my job is explain that on that stage and then bring this country together around the means to actually get that done," he said.

During the debate, O’Rourke was discussing his immigration platform when Castro interrupted him, pointing out he did not support repeal of that section of the law.

“Some of us on this stage have called to end that section … some, like Congressman O’Rourke have not and I want to challenge all of the candidates to do that,” he said.

O’Rourke previously told CNN that he did “not think it should be repealed,” citing attempts by some crossing the border to smuggle people or drugs into the U.S. On Wednesday, Castro pointed out there are other parts of the law that address those issues.

"If you did your homework on this issue, you would know," Castro said.

The two talked over each other with O’Rourke telling Castro, “You’re looking at just one small part of this, I’m talking about a comprehensive rewrite of our immigration laws.”

"I don't think he's done his homework," Castro repeated after the debate. "The difference between my immigration plan and his immigration plan is an important one. The only way we're going to end family separations ... is treat [crossing the border] as a civil violation."