ATLANTIC CITY, N.J. (AP) — The prospect of legal sports betting throughout the United States has prompted a flurry of deals among gambling and technology firms who want a foothold in the billion-dollar industry.

Casinos, race tracks, daily fantasy sports companies and others are itching to offer bets in person and online after the Supreme Court ruled Monday that states could begin allowing wagers. That's led companies all over the world to seek ways to team up.

Some casinos need mobile apps or someone to set lines and run sports books that operate much differently than slot machines and table games. Many tech firms, daily fantasy sports companies and others need gambling licenses and experience with significant regulation. Other companies that handle data security and payment processing are also joining the fray.

The industry is preparing for most of the betting to happen on smartphones, just like in Europe. That would also be new for most U.S. states, as internet gambling has been limited to just three states in recent years.

"This is a multibillion-dollar industry that has been operating in darkness and can now be brought into the light with legalization and regulation," said Richard Schwartz, president of Rush Street Interactive, which operates SugarHouse Online Casino, a gambling site for New Jersey residents that offers slots and table games.

Churchill Downs, the race track that runs the Kentucky Derby, said Wednesday it inked deals with a tech company for its platform and the Golden Nugget casino in Atlantic City for its license in New Jersey. It bought Presque Isle Downs & Casino in Pennsylvania in March and owns two casinos in Mississippi, with plans to offer sports betting in all three states.

Dublin-based gambling firm Paddy Power Betfair has an online casino in New Jersey but is considering merging its U.S. business with FanDuel, the popular daily fantasy sports company, in a deal with clear upside for both sides. Betfair would gain a well-known American brand with millions of customers built on technology that could be used for sports betting. FanDuel, meanwhile, would need expertise on complex regulation if it hopes to gain a casino license, a move that most fantasy sports companies tried for years to avoid by arguing that fantasy sports doesn't amount to gambling.

Anticipation of the ruling even prompted some companies to squash their differences and focus on the potential windfall. London-based bookmaker William Hill had threatened to use its stock to derail a buyout between two online gambling infrastructure firms in Las Vegas. But it later agreed to support the purchase of NYX Gaming by Scientific Games.

The opportunities are vast for companies that can help customers turn from illegal bookies and offshore operations, said Laila Mintas, deputy president of Sportradar, a New York company that works with more than 70 sports federations and leagues around the world on fraud detection, including the NBA, NHL and MLS.

"It opens the door for all different stakeholders such as the states, the leagues, the casino and lottery industry to act quickly and to benefit," she said.

Mattias Stetz, Rush Street's chief operating officer, said it plans to offer traditional betting on final scores, along with betting on developments within each game like which team will score next or who will commit the next foul. That's the fastest growing segment of sports betting and popular in Nevada, the only state that had been taking single-game sports bets before the Supreme Court ruling.

Major casino companies MGM Resorts International and Caesars Entertainment and Tropicana Entertainment (recently bought by Eldorado Resorts) all announced plans to offer sports betting outside Nevada, as did the soon-to-open Hard Rock and Ocean Resort casinos in Atlantic City.

David Katz, equity analyst at Jefferies, said Penn National Gaming and Caesars Entertainment are in a better position than their peers because of their many locations in multiple states, "particularly where there is a high probability of sports betting becoming legal sooner rather than later."

Caesars is in a particularly advantageous position, he said, because it has been doing its own bookmaking for years, combining experience with a large amount of volume.

More From 1460 ESPN