AUSTIN, Texas (AP) — A federal judge on Wednesday blocked a Texas law that for decades has given college students without legal residency access to reduced in-state tuition, swiftly ruling in favor of the latest effort by the Trump administration to to crack down on immigration.

Within hours after the Justice Department filed a federal lawsuit to block the 2001 law, Republican Texas Attorney General Ken Paxton filed a motion in support of the lawsuit, and U.S. District Judge Reed O’Connor issued a ruling that the law as applied to someone “not lawfully present in the United States .... (is) unconstitutional and invalid.”

“Ending this discriminatory and un-American provision is a major victory for Texas,” Paxton said.

Texas was the first state to pass a law allowing “Dreamers,” or young adults without legal status, to be eligible for in-state tuition if they meet certain residency criteria.

And while two dozen states now have similar laws, the Trump administration filed the lawsuit in conservative Texas, where Republican Gov. Greg Abbott and state lawmakers have long sought to support the president’s hard-line goals on the border.