The Supreme Court agreed on Tuesday to hear an appeal from Gov. Chris Christie and the state of New Jersey to allow betting on professional and collegiate sports at the state’s casinos and racetracks.

The case, which the court will hear in the fall, will be a major test for the federal ban on sports betting as established by the Professional and Amateur Sports Protection Act, known as Paspa, which Congress passed in 1992 outlawing betting on amateur or professional athletes except in four states that already had operations.

New Jersey has been fighting either to overturn the federal ban or to find a way to work around it since 2011, when voters in the state approved a nonbinding resolution to allow sports betting. The effort has since been supported by Democratic and Republican legislators as a way to help shore up the sagging Atlantic City casinos and state racetracks.

But the effort was met with lawsuits from the N.C.A.A. and the four major sports leagues after Mr. Christie signed a law in 2014 to allow sports betting. The challenges wound their way through numerous lower courts, finally reaching the United States Court of Appeals for the Third Circuit in Philadelphia, which issued a ruling last year upholding the federal ban.