LAS VEGAS (KLAS) — The federal statute outlawing re-entry into the United States by people who have been previously deported is unconstitutional, according to a Wednesday ruling by U.S. District Court of Nevada Chief Judge Miranda Du.

The 43-page ruling came in a case involving Gustavo Carrillo-Lopez, who was indicted last year. He was originally deported in March 1999.

Lawyers for Carrillo-Lopez argued that the law disproportionately targeted “Latinx individuals.”

Du’s ruling cited racist origins tied to laws previously passed in 1929 and 1952. The “racial animus” that motivated earlier laws has not been erased by years of renewing laws based on a biased legal foundation, the court ruled.

It’s the first time the law has been rejected.

More than 25,000 people were charged with illegal re-entry under the law in fiscal year 2019, according to legal experts. The re-entry statute provides for stiffer prison sentences — as long as 20 years.

Carrillo-Lopez’s motion to dismiss the case was granted. The indictment was dismissed and the case was closed.

Du ruled that the federal government failed in their arguments that the law’s intent was to prevent economic competition, uphold national security or facilitate foreign relations.

The Department of Justice has not indicated if they would appeal the ruling or not.