Imagine that in 2023, a newly elected Congress wants to stop Black and brown people from legally immigrating to the United States. Legislators give speeches on the House and Senate floors complaining that U.S. immigration policy allows the infusion of “negro slave blood.” They claim that the “Mexican peon” is “poisoning the American citizen.” They refer to Black and brown immigrants as “mongrels” who are “undesirable.” They want to keep the country’s blood “white and purely Caucasian.” Then Congress passes a law that doesn’t say anything about race but magically gets the desired result: 99% of all people denied entry to the United States are Black or brown.

Immigrants bring a constitutional challenge, arguing that Congress’s racist motives deny them equal protection under the Fifth Amendment. They cite decades-old precedent holding that such a law can only stand if the government shows it would have passed without a racist motive.

But the Attorney General defends the law. He claims it’s not a law about race. It’s really a law about immigration. And because it’s a law about immigration, it doesn’t matter whether it was motivated by racism. All that matters is whether there’s some hypothetical reason floating out there that could justify it. In court, the AG then explains that too much immigration to the United States would embarrass other countries, causing foreign relations problems. The fact that lawmakers talked about Black and brown people “poisoning the American citizen,” the government says, doesn’t matter; the law must stand so other countries don’t feel bad.

This position would be absurd if the Department of Justice weren’t currently using it to defend the most frequently prosecuted federal felony today. Two laws known as Sections 1325 and 1326 criminalize unlawfully entering the United States and reentering after a prior deportation, respectively. When Congress first passed these laws in 1929, legislators justified them with the exact slurs quoted above, all of which appear in the Congressional Record. But because these laws purportedly “regulate” immigration, the DOJ now says that it doesn’t matter whether hate and bigotry motivated their creation. All that matters is whether there’s a rational basis for their existence—and yes, the DOJ actually cites “diplomatic embarrassment” as a basis.

This week, the Ninth Circuit Court of Appeals will hear oral argument in United States v. Carrillo-Lopez, where it will have the chance to decide whether to adopt the DOJ’s argument. (Disclosure: I’m the attorney for the defendant in United States v. Rodrigues-Barios, a companion case.) Carrillo-Lopez is an opinion written last year by Chief Judge Miranda Du, after she heard testimony from expert historians on the racist origins of Section 1326.

In a 43-page opinion, Chief Judge Du agreed that the law violates equal protection, relying on this testimony and hundreds of pages of evidence to strike down Section 1326. But the DOJ appealed, arguing this history was irrelevant. If the Ninth Circuit agrees, it would give Congress free reign to enact any blatantly discriminatory immigration law it wants, so long as some lawyer at some point in the future could come up with a half-baked excuse to justify its continued existence.

It’s impossible to understand Sections 1325 and 1326 without examining the racism permeating an infamous social theory at the time of their creation. In the 1920s, when Congress first created these laws, a new pseudoscience called “eugenics” was all the rage. Proponents claimed that traits like intelligence and success and temperament boil down to biology, and that society can improve if only it weeds out the genetic “inferiors”—the criminals, the drunks, the imbeciles.

Conveniently, “biology” was also code for “race.” Eugenics helped fuel the enforcement of Jim Crow laws and the resurgence of the Ku Klux Klan. It shaped the ideology of Hitler and the Third Reich. And it provided justification for a rising anti-immigrant sentiment against people of color who were coming to the U.S. in ever-greater numbers. As the “Expert Eugenics Agent” for the House Committee on Immigration and Naturalization once put it—yes, Congress once had its very own “Expert Eugenics Agent”—biology should drive U.S. immigration policy, because “successful breeders of thoroughbred horses” would never consider “acquiring a mare or a stallion not of the top level” for their “stud farm.”

Thus, in an effort to protect “American racial stock” from “further degradation or change through mongrelization,” Congress tried to pass a law severely restricting immigration from everywhere but northern and western Europe. But there was a problem: Southwestern agricultural businesses needed cheap Mexican labor to harvest their crops. So while “nativists” in Congress designed the law to prevent people of color from coming to the U.S., the agribusinesses forced Congress to include an exception for countries in the Western Hemisphere.

The nativists were not happy. They grumbled that the law “leaves open the doors for perhaps the worst element that comes into the United States—the Mexican peon.” Eventually, they found a solution: pass a new law that makes it a crime to enter the U.S., then prosecute and deport Mexicans after they’re here—once the harvest is over.

The agribusinesses were on board. South Carolina Senator Coleman Livingston Blease, who one historian calls an “unrepentant white supremacist,” introduced a bill known as the “Undesirable Aliens Act of 1929.” He sent it to Representative Albert Johnson, Chairman of the Committee on Immigration and a noted eugenicist, for passage in the House. Secretary of Labor James Davis, another noted eugenicist, lobbied for its passage. The bill became law in a matter of weeks. Congress had found a way to use criminal laws to achieve its immigration policy goal: keep the country’s blood “white and purely Caucasian.”

When most people think of federal crimes, they think of guns, drugs, or terrorism. But today, the Department of Justice prosecutes more people for illegal entry and reentry—the two crimes the “Undesirable Aliens Act of 1929” created—than for these and all federal felonies combined. Prosecuting someone for illegal reentry has nothing to do with civil deportation, which will happen regardless of whether the person is convicted. There’s no evidence that it deters anyone from entering the U.S. unlawfully. All it does is imprison the individual for up to 20 years on top of that deportation, costing taxpayers over $1.3 billion a year.

But the punishment for illegal entry became even steeper in April 2018. That month, Attorney General Jeff Sessions announced a “zero tolerance” policy that separated parents from their children during these prosecutions, with no plan to reunite them. Suddenly the penalty for a first-time misdemeanor illegal entry wasn’t a maximum of six months in jail. It was never seeing your two-year-old again.

The cruelty of this policy sparked widespread media coverage of the laws’ origins. Federal public defenders like myself, who had long represented people charged with violations of Sections 1325 and 1326, had no idea about this history. Together with professors, immigrant rights groups, and grassroots organizations, we started brainstorming legal challenges, drawing on cases that say that a law violates equal protection if it was enacted with a discriminatory purpose and the government can’t show the law would have passed without it. We filed dozens of challenges in dozens of states and lost every time—until the decision in United States v. Carrillo-Lopez struck down Section 1326 as unconstitutional.

Carrillo-Lopez affected only one person’s case. But, astonishingly, on appeal, the DOJ has refused to admit that racism motivated the creation of illegal reentry, retracting its prior concession as “improvidently made.” Not only that, but the DOJ is also arguing that even if Congress were motivated by racism, it doesn’t matter because Section 1326 is an “immigration law,” not a criminal one. So to decide whether illegal reentry denies equal protection, the DOJ denies that courts can consider, for example, that lawmakers’ stated goal was to keep the country’s blood “white and purely Caucasian,” or that lawmakers considered Mexicans to be “illiterate, unclean, peonized masses” whose “evil stream will continue to pour its pollution into the mass of our population.”

Instead, the government says, courts must turn a blind eye to this history so long as the law is “rationally related to a legitimate government purpose.” This “rational basis” standard is where equal protection challenges go to die, since lawyers can always come up with some reason to justify a law even if it’s not the actual reason Congress used.

If the Ninth Circuit and other courts of appeal agree with the DOJ, nothing could stop current and future Congresses from passing blatantly racist immigration laws with impunity. What if the Speaker of the House proposes cutting visa numbers from Mexico while running around the floor in a sombrero? Fine. What if the minority whip argues to renew the bar on sex workers entering the U.S. while wearing a kimono? No problem. The DOJ’s position would literally allow Congress to march onto the Senate and House floors in white robes, burn a cross, and salute the Aryan race during a vote on an immigration bill, and judges would be powerless to consider whether it was motivated by racism.

Congress shouldn’t get a free pass to discriminate in perpetuity. If racism fueled the creation of Section 1326, courts must strike it down. The fact that a law’s history is shameful does not give judges license to declare themselves powerless to do anything about it.