Get ready to place your bets, New Jersey. For real this time.

Gov. Phil Murphy on Monday signed a law that finally authorizes legal sports betting in New Jersey, ending a nearly decade-long saga that included a multimillion court battle against the nation's top sports leagues and a landmark ruling from the nation's highest court.

Monmouth Park racetrack in Oceanport is planning to become the first parlor in the Garden State to accept bets on professional and college sports games, starting Thursday at 10:30 a.m.

That's just in time for the start of the World Cup, which begins the same day.

"Today, we're finally making the dream of legalized sports betting a reality for New Jersey," Murphy said in a statement Monday after signing the law, which lays out how the state will regulate and tax the betting.

The governor said the move will "attract new business and new fans, boosting their own long-term financial prospects."

"This is the right move for New Jersey and it will strengthen our economy," Murphy added.

Today, we’re finally making the dream of legalized sports betting a reality for New Jersey. This is the right move for our state and will strengthen our economy. pic.twitter.com/Dw3AIXnFGY — Governor Phil Murphy (@GovMurphy) June 11, 2018

The law (A4111) allows people age 21 and over to bet both over the internet and in person at New Jersey's casinos, racetracks and former racetracks.

But online betting isn't permitted to begin for 30 days, and not every casino or track is ready to start accepting wagers.

The move is expected to bolster the state's struggling casino and horse-racing industries and allow the state to reap millions annually in new tax revenue, by tapping into what has long been a billion-dollar, but predominantly illegal, market.

Murphy's signing comes a month after the U.S. Supreme Court gave New Jersey a victory in its seven-year quest to legalize sports betting -- a case that cost the state $9 million in taxpayer money. The court overturned a 1992 federal ban on such wagering, allowing states across the country to permit it.

New Jersey will become the second state outside of Nevada to authorize sports betting. Delaware beat the state by about a week.

Until the Supreme Court's ruling, Nevada -- home to Las Vegas -- was the only state in the nation with full-scale legal sports wagering.

"It's history in the making," state Assemblyman Ralph Caputo, D-Essex, one of the sponsors of New Jersey's law, said Monday. "This is one of those moments when you're pleased you serve as an elected official. This is in an instance where you provide something that's good for the public, that's good for the citizens, that cleans up an industry that needs to be changed, and hopefully helps New Jersey's economy."

Betting can't begin right away because there's still one hurdle left. The New Jersey Racing Commission -- which will grant sports betting licenses to tracks -- is scheduled to meet Wednesday to review emergency regulations. After that, Murphy must ratify the decision and tracks can apply for a temporary waiver to begin accepting bets.

Sports wagering at the casinos will be overseen by the state Division of Gaming Enforcement. It's unclear if casinos will also receive temporary waivers.

The waiver would allow Monmouth Park to finally launch the multimillion dollar sports-betting parlor it built with British bookmaker William Hill years ago in preparation for this day.

Track operator Dennis Drazin said, pending approval, anyone is welcome start betting there Thursday morning -- though a few dignitaries will place the first wagers.

Murphy is expected to be first, but Drazin said former Gov. Chris Christie, state Senate President Stephen Sweeney, state Assembly Speaker Craig Coughlin, U.S. Rep. Frank Pallone, and former state Sen. Raymond Lesniak are also invited.

"We have more than one teller," Drazin noted.

Lesniak, the Union County Democrat who spent years leading New Jersey's fight for sports betting, said he was "relieved" by Monday's news.

His first bet? "France to win the World Cup," Lesniak said.

Under the law, you cannot bet on high school sports, on college events taking place in the state, or any event involving a New Jersey college team anywhere.

The Borgata, Atlantic City's top casino, also has a sports betting parlor ready to go. But while officials there said they're "moving ahead with all possible speed" to open, they could not immediately say when that would happen.

Both the city's Golden Nugget casino and Meadowlands Racetrack in East Rutherford said they should have betting up and running by the start of football season in September.

Atlantic City's other six casinos and the state's other racetrack, Freehold Raceway, are also expected to eventually have sports wagering. The law also allows former tracks -- in Atlantic City and Cherry Hill -- to accept bets.

But none of those facilities have timetables yet.

For Atlantic City, the wagering is expected to give a new reasons for tourists to trek to the seaside gambling resort, which had been on the brink of bankruptcy in recent years because of casinos popping up in neighboring states.

For racetracks, it could mean even more. Drazin said sports betting represents "survival" for Monmouth Park and other tracks in New Jersey, which do not feature casinos like other states.

"This means our whole future," Drazin said.

It will also help the state budget.

Americans already spend billions of dollars placing sports bets through illegal bookies each year. But by legalizing it, officials say, the state can siphon off those dollars and bring the industry above ground.

State officials estimate it will bring New Jersey at least $13 million in tax revenue the first year -- though some lawmakers say that's a conservative figure.

The state's fight began in 2009, when Lesniak first proposed the idea of challenging the federal ban. Two years later, New Jersey voters approved a constitutional amendment allowing sports betting to take place at casinos and tracks. Christie signed it into law in 2012.

But five pro and college sports leagues -- the NFL, NBA, MLB, NHL, and NCAA -- sued repeatedly over the next few years to stop the state, saying it would hurt the integrity of their games and violate the federal ban.

Ironically, the ban was sponsored by one of New Jersey's then-U.S. senators, former New York Knicks star Bill Bradley.

The leagues won every step of the way -- including when the courts stopped Christie and New Jersey from launching sports betting in 2014 with a law that aimed to get around the ban by not having the state regulate the wagering.

But the Supreme Court had the final say last month, ruling the ban violated the U.S. Constitution.

Christie's administration led the case almost the entire time, until Murphy succeeded Christie in January.

Sweeney, the state Senate president and a sponsor of the law, said New Jersey "overcame multiple legal obstacles and withstood the determined efforts of opponents" to win in court.

"We can now capitalize on the opportunities we worked for with a new sector of sports gaming that will help create jobs, generate economic activity and be an important boost to the state's casinos and racetracks," Sweeney, D-Gloucester, said in a statement Monday.

Murphy's signing comes four days after the state Legislature passed the law and stripped out language that prevented Monmouth Park from opening immediately. But track officials said they would still wait for Murphy's blessing.

Initially, there was concern the governor would hold onto the bill as leverage in state budget talks. Multiple lawmakers slammed Murphy for not signing the measure right away, saying the state was missing out on revenue during a weekend that included the Belmont Stakes, the last game of the NBA Finals, and the Yankees vs. Mets Subway Series.

But Murphy said he was simply reviewing the measure to make sure it was "right."

Drazin, Monmouth Park's operator, said he felt Murphy "acted swiftly" in the end.

The Associated Press contributed to this report.

Brent Johnson may be reached at bjohnson@njadvancemedia.com. Follow him on Twitter @johnsb01. Find NJ.com Politics on Facebook.