The U.S. Supreme Court’s recent decision allowing states to legalize sports betting makes a federal law that attempts to control state immigration policies unconstitutional, a federal judge said in a decision Friday.

The opinion was part of a larger decision by U.S. District Judge Edgardo Ramos of the Southern District of New York, who said Friday the U.S. Department of Justice could not place immigration-related conditions on so-called “sanctuary jurisdictions” to receive a federal criminal justice grant.