WASHINGTON (AP) - The Supreme Court on Monday gave its go-ahead for states to allow gambling on sports across the nation, striking down a federal law that barred betting on football, basketball, baseball and other sports in most states.

The justices voted 6-3 to strike down the Professional and Amateur Sports Protection Act, a 1992 law that forbade state-authorized sports gambling with some exceptions. It made Nevada the only state where a person could wager on the results of a single game.

Many states have hoped their cut of legalized sports gambling could help solve budget problems. Stock prices for casino operators and equipment makers surged after the ruling was announced.

The ruling, in a case from New Jersey, creates an opening to bring an activity out of the shadows that many Americans already see as a mainstream hobby. The American Gaming Association estimates that Americans illegally wager about $150 billion on sports each year, and one research firm estimated before the ruling that if the Supreme Court were to strike down the law 32 states would likely offer sports betting within five years.

Justice Samuel Alito wrote for the 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. Our job is to interpret the law Congress has enacted and decide whether it is consistent with the Constitution. PASPA is not.”

Justices Ruth Bader Ginsburg, Stephen Breyer and Sonia Sotomayor dissented. Ginsburg wrote for the three that when a portion of a law violates the Constitution, the court “ordinarily engages in a salvage rather than a demolition operation,” preserving what it can. She said that instead of using a “scalpel to trim the statute” her colleagues used “an axe” to cut the remainder down. Breyer agreed with the majority of the court that part of the law must be struck down but said that should not have doomed the rest of the law.

Concerned that questions will be raised at some point that betting could affect teams’ performance and the outcome of games, all four major U.S. professional sports leagues, the NCAA and the federal government had urged the court to uphold the federal law. In court, the NBA, NFL, NHL and Major League Baseball had argued that New Jersey’s gambling expansion would hurt the integrity of their games. Outside court, however, leaders of all but the NFL have shown varying degrees of openness to legalized sports gambling.

On Monday, Major League Baseball issued a statement saying the Supreme Court ruling would have “profound effects” on the league and that it would “continue to seek the proper protections for our sport.”

NBA commissioner Adam Silver says the pro basketball league remains favor “of a federal framework that would provide a uniform approach to sports gambling in sates that choose to permit it.” He said that “regardless of the particulars of any future sports betting law, the integrity of our game remains our highest priority.”

Representatives of the National Hockey League and National Football League had no immediate comment on the ruling, saying they were analyzing it. The NCAA’s chief legal officer said the organization is still reviewing the court’s decision but added that it “will adjust sports wagering and championship policies to align with the direction from the court.”

The court’s decision came in a case from New Jersey, which has fought for years to legalize gambling on sports at casinos and racetracks. Former Gov. Chris Christie said after arguments in the case in December that if justices sided with the state, bets could be taken “within two weeks” of a decision.

After the ruling was announced, the former Republican governor tweeted that it was a “great day for the rights of states and their people to make their own decisions.” The state’s current governor, Democrat Phil Murphy, also cheered the ruling, saying he was “thrilled” to see the high court strike down the “arbitrary ban.” He said he looked forward to working with the Legislature to “enact a law authorizing and regulating sports betting in the very near future.”

Monmouth Park, a racetrack at the Jersey Shore, has already set up a sports book operation and has previously estimated it could take bets within two weeks of a favorable ruling.

Tony Rodio, president of Tropicana Entertainment, said his Atlantic City casino will “absolutely” offer sports betting once it can get it up and running. “It’s been a long time coming,” he said.

New Jersey has spent years and millions of dollars in legal fees trying to legalize sports betting. In 2012, with voters’ support, New Jersey lawmakers passed a law allowing sports betting, directly challenging the 1992 federal law. The four major professional sports leagues and the NCAA sued, and the state lost in court.

In 2014, New Jersey tried a different tactic by repealing laws prohibiting sports gambling at casinos and racetracks. It argued that taking its laws off the books was different from authorizing sports gambling. The state lost again and then took the case to the Supreme Court.

More than a dozen states had supported New Jersey, which argued that Congress exceeded its authority when it passed its law. New Jersey said the Constitution allows Congress to pass laws barring wagering on sports, but Congress can’t require states to keep sports gambling prohibitions in place.

___

Associated Press reporter Wayne Parry contributed reporting from Atlantic City, New Jersey and Steve Megargee contributed reporting from Knoxville, Tennessee.

Copyright 2018 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.