The U.S. Supreme Court made a landmark ruling that could allow states across the country to legalize sports betting.

The justices ruled 7-2 that a 25-year-old federal law that has effectively prohibited sports betting outside Nevada cannot block states such as New Jersey that want to set up sports books.

The state of New Jersey brought the case after passing a law legalizing sports betting in 2012, which had been challenged in lower courts by both the NCAA and the four major professional sports leagues. The law was overturned, but the state tried again with a new law in 2014.

The decision could allow states to expand legalized sports betting as a source of revenue, but Congress may respond. The major sports leagues have said federal regulation could provide a national standard for sports betting, as opposed to allowing individual states to set up their own rules. The NCAA had previously said that the spread of gambling is “a threat to the integrity of athletic competition and student-athlete well-being.”

However, Justice Samuel Alito wrote on behalf of the Supreme Court, “The legalization of sports gambling requires an important policy choice, but the choice is not ours to make.

“Congress can regulate sports gambling directly, but if it elects not to do so, each state is free to act on its own.”