It was the first moment of fireworks Wednesday night. Julian Castro, the former HUD secretary under President Obama, took a shot at his fellow Texan, former Rep. Beto O’Rourke on his record on immigration: “I think you should do your homework,” Castro said.

The issue? A little-known, near-century-old statute that’s the backbone of Trump’s family separation policy.

Section 1325 of Title 8 of the U.S. Code makes it a crime for someone to enter the U.S. somewhere other than an official port of entry. It’s what makes crossing the border without authorization illegal — specifically, a misdemeanor; re-entering after being deported is a felony — and it dates back to a low point in U.S. immigration history.

Castro wants to repeal it.

“The reason they’re separating these children from their families is that they’re using Section 1325 of that act, which criminalizes coming across the border, to incarcerate the parents and then separate them,” Castro said, referring to the 1924 Immigration and Nationality Act. “Some of us on this stage have called to end that section, to terminate it. Some, like Congressman O’Rourke, have not, and I want to challenge all the candidates to do that.”

Congress passed a law implementing a quota system for European immigrants at the behest of immigration restrictionists and eugenicists in 1924. The law all but ended immigration from Southern and Eastern Europe. Earlier laws had banned Asian immigration, but there was still Latin America to worry about.

In 1929, Coleman Blease, a white supremacist South Carolina senator who openly supported lynching, came up with a solution: criminalizing unauthorized entry. By the end of the next decade, the U.S. had prosecuted more than 44,000 illegal entry cases, according to historian and UCLA professor Kelly Lytle Hernández.

As Vox notes, illegal entry prosecutions slowed down after that, and the law was barely enforced for most of the twentieth century. Enforcing the law was more trouble than it was worth. But President George W. Bush, who oversaw the creation of the Department of Homeland Security, brought these prosecutions back in full force. Immigration offenses now make up the majority of criminal prosecutions.

Last summer, the Trump administration ramped up “illegal entry” prosecutions under the so-called Zero Tolerance policy that led to the separations of thousands of migrant families at the border.

Family separation was largely thought of as a Trump policy, and in some ways it was — the government can choose whether or not to prosecute people for crossing the border. There was never an on-the-books policy mandating the separation of migrant families. Instead, the Department of Justice began prosecuting everyone who crossed the border without authorization.

As a result, parents were taken into criminal custody; their children, meanwhile, were sent to shelters for “unaccompanied” migrant children.

Put simply, the separations were a feature, not a bug, of the administration’s decision to enforce Section 1325.

Any president could choose not to enforce Section 1325. Castro’s plan goes a step further: he wants to eliminate the statute that makes these prosecutions possible in the first place. That doesn’t mean people could come into the U.S. without being deported — deportations would still be handled by civil courts as they always have been, but migrants wouldn’t be imprisoned and prosecuted before those deportations happened.

Castro called on his opponents to pledge to repeal Section 1325, and three others — Massachusetts Sen. Elizabeth Warren, New Jersey Sen. Cory Booker, and Washington Governor Jay Inslee — said they would. O’Rourke, meanwhile, said repealing the statute could incentivize human trafficking.

Earlier in the debate, O’Rourke said his immigration policy would ensure that people like Óscar and Valeria Martínez, the father and child who drowned while trying to cross the Rio Grande this week, would be allowed to enter the U.S.

But Óscar and his daughter weren’t asylum seekers, at least not in the legal sense. His mother told the New York Times that Óscar and his wife had fled Altavista, a small town in El Salvador that is all but controlled by gangs, because they couldn’t survive on just $10 a day.

Tens of thousands of migrants like Óscar and Valeria are coming to the U.S. every day, and although they’re fleeing horrible conditions like poverty and violence, they wouldn’t necessarily qualify for asylum — asylum-seekers have to prove that they face persecution due to their race, religion, nationality, political opinion, or their membership in a particular “social group.”

O’Rourke didn’t seem to understand the distinction. “As a member of Congress, I helped to introduce legislation that would ensure that we don’t criminalize those who are seeking asylum and refuge in this country,” O’Rourke said.

Then Castro interrupted: “I’m not talking about the ones that are seeking asylum. I’m talking about everybody else.”