Gov. Murphy on Monday signed into law the state’s sports-betting bill, ending a short delay that drew criticism from many state politicians and making history after the state’s six-year battle to legalize sports wagering.

Murphy expects to place the ceremonial first bet at Monmouth Park Racetrack on Thursday morning, his office said.

“Today, we’re finally making the dream of legalized sports betting a reality for New Jersey,” Murphy said in a statement. “This is the right move for New Jersey, and it will strengthen our economy.”

The law makes New Jersey the second state, after Delaware, to legalize sports betting since the Supreme Court ruled three weeks ago to strike down the federal ban on sports gambling. It is the culmination of New Jersey’s protracted fight to legalize sports betting, which saw the state go up against the NCAA and professional sports leagues.

For proponents, it offers hope for bringing renewed life to casinos and racetracks with the opportunity to tap into a multibillion-dollar market. New Jerseyans will be able to bet legally at sports-wagering lounges on most professional and collegiate sporting events.

Monmouth Park has been ready to start betting for weeks, investing more than $1 million in outfitting the first floor with a sports-betting lounge. Other racetracks are primed to open their books across the state, and Atlantic City officials have lauded the extra revenue it is expected to bring in at casinos.

“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,” said Senate President Stephen Sweeney (D., Gloucester). “We will see sports betting get up and running, and we intend to see that New Jersey continues to be a leader with a sports gaming industry that thrives. Our efforts will pay off.”

Other legislators said the law would help horse breeders, farms, casinos, and racetracks by bringing new participants to gambling and generating revenue for the state’s general fund, casino fund, and Atlantic City marketing program.

“This will help make our casinos and racetracks more attractive gaming destinations, provide much-needed revenue to support the state budget, provide additional funding for valuable social programs, and cut down on illegal sport gaming activity,” said Assembly Speaker Craig J. Coughlin (D., Middlesex).

Sports gambling may not be as lucrative as some hope. The state estimates it will bring in about $17 million in the first full year, not a large sum within a $37 billion state budget. Casinos and racetracks will pay an 8.5 percent tax for in-person betting and 13 percent for online betting, with an additional 1.25 percent on electronic bets for racetrack operators.

The bill was passed by the legislature Thursday, but Murphy did not sign it immediately, and the state Racing Commission sent a letter to some racetracks warning them not to begin taking bets until he did so. The delay created uncertainty about when wagering would begin, and Murphy signed the bill Monday with little advance warning.

In the meantime, criticism of Murphy mounted. His delay in signing “will go down in history as one of the most bungled state policies anywhere, anytime!” Sen. Declan O’Scanlon (R., Monmouth) wrote on Facebook.

The New Jersey Racing Commission will meet to discuss regulations Wednesday, then create regulations that Murphy must ratify, according to the governor’s statement. After that, racetracks and casinos will be able to secure the waiver needed to begin betting.

Online sports betting cannot begin until 30 days after the bill was signed. Any racetrack or casino that is licensed can operate sports wagering, with one exception — if an owner also has a 10 percent or greater share in a sports team, the wagering lounge cannot take bets on any team in the league. This will likely affect the Golden Nugget Casino, whose owner, Tilman Fertitta, bought the Houston Rockets for $2.2 billion last year, and thus would be unable to offer bets on the NBA at the Golden Nugget. The bill also has a carve-out for the former Garden State Park racetrack in Cherry Hill that would allow the owners of the site to open a sports-betting parlor.

Without the federal ban in place, any state can vote to legalize sports betting. Pennsylvania has legalized the practice and is working to draft regulations that must be in place before books can open. License applications are currently open for casinos. Other states are also working on it, including New York, Mississippi, and West Virginia.