New Jersey’s successful Supreme Court challenge to the federal ban on sports gambling in the state comes at a good time for Atlantic City.

Hours after Monday’s decision, legislators began working toward quick approval of regulations to allow city casinos and state racetracks to begin accepting bets on all professional sports contests and collegiate games outside New Jersey and not involving state teams. Senate President Stephen Sweeney said he expects to pass a bill at the next session on June 7.

Although there will be lots of states offering sports gambling — Fitch Ratings counts five with laws already enacted and another 13 with legislation introduced — New Jersey and its gaming companies are more prepared and we expect Atlantic City casinos to offer a bigger and better version of sports betting.

Additional revenue will motivate state officials to get it done quickly. Early estimates are that sports betting could yield $100 million a year in state tax revenue.

For Atlantic City and its casinos, though, there is a gain besides the relatively modest increase in the city’s $2.6 billion gaming market. Sports betting will draw new visitors who will find a revitalized and exciting Atlantic City, with freshly opened Hard Rock and Ocean Resort casino hotels and many other improvements.

The only timing that would have been better would have been the early 1990s, when two of its former political leaders cost New Jersey its chance to join Las Vegas as a sports gambling capital. N.J. Sen. Bill Bradley, a former pro basketball player, pushed for a ban on sports betting in his state and others outside of Nevada. Speaker Garabed “Chuck” Haytaian wouldn’t allow the Assembly to vote on a referendum to let New Jersey also have sports gambling under federal law, knowing both would pass.

Even local legislators gave up on sports betting after that, except for then-Assemblyman (and now Sen.) Jeff Van Drew, who started pushing to pursue it again in 2004 and introduced a bill the following year for a referendum to legalize betting in Atlantic City on pro sports.

When New Jersey voters finally got their say in a 2011 nonbinding referendum, two-thirds approved of sports gambling. That helped get legislation by former state Sen. Raymond Lesniak passed establishing legal sports betting at Atlantic City casinos and horseracing tracks, a direct challenge to the 1992 federal law allowing it only in Nevada, Delaware, Montana and Oregon.

Former Gov. Chris Christie signed the law and started a legal challenge that, frankly, looked impossible — right up until it succeeded against all odds. The first attempt lost at each step in federal court, and the Supreme Court declined to consider an appeal in 2014. A second attempt, based on an assertion of states’ rights, seemed to do no better. When the full Third Circuit U.S. Court of Appeals upheld the federal ban in August 2016, many observers, including this newspaper, urged the Christie administration to quit spending money and time trying to fix New Jersey’s sports gambling mistake.

Then last year, the U.S. Supreme Court accepted the appeal of the Third Circuit’s ruling, and experts noted how the court might look favorably on New Jersey’s argument that the federal ban was an intrusion into the right of states to regulate activity within their borders.

This week the justices did just that, bringing victory to a cause championed by a lonely few for many years.

Like all else that has gone well for Atlantic City this year, sports betting has resulted from diligent, patient work. Still, if we didn’t know better, we’d say the city is on quite a lucky streak in 2018.