Flutter Entertainment Plc is buying The Stars Group Inc. in a $6 billion all-share deal to create the world’s biggest online gaming group and take advantage of opportunities in the U.S. after the Supreme Court legalized sports betting.

Flutter, headquartered in Dublin, said in a statement it has offered 0.2253 of its shares in exchange for each Stars share. The Toronto-based target owns the American PokerStars brand, has partnerships with casinos including Reno, Nevada’s Eldorado Resorts Inc., and recently signed a deal with Fox Sports.

While Flutter has a U.S. presence -- it owns the FanDuel fantasy sports site -- it derives almost half its revenue from Britain, where tighter rules on fixed-odds betting terminals and higher taxes for online betting have upended the industry. Its shares rose as much as 22% on Wednesday, while Stars’s soared 38% in premarket trading.

For the buyer this is “a truly transformational deal for both the company and the industry,” Davy analysts Michael Mitchell and Jack O’Halloran said in a research note. “We see strong strategic merit to the transaction. It improves Flutter’s position in key growth markets, including the U.S., while also bolstering scale” and position in its core markets.

In May last year, America’s highest court struck down a federal law that had barred single-game gambling in most of the country. However, the only way for foreign companies to enter the market is through partnerships with U.S. firms.

Flutter’s offer assigns an equity value to the target of about 4.95 billion pounds ($6 billion), which represents a premium of about 40% to Tuesday’s closing share price, according to Bloomberg calculations. Its shares traded at 8,566 pence at 1:32 p.m. London time. European peers such as William Hill Plc also rose on the news.

Given the size of the American economy and its lucrative sports leagues, “you could see a market north of $20 billion of annual revenue, which would be far and away the biggest legal betting market in the world,” said Greg Johnson, analyst at Shore Capital.

The deal has handed Jeff Ubben’s ValueAct Capital Management a significant payday. The activist fund built a 4.7% stake in Stars in the second quarter, when the average share price was $17.76. The stock traded at $20.67 in premarket trading.

“We are very excited about this transaction,” said Alex Baum, vice president at ValueAct. “We have been an engaged shareholder in Stars Group for some time and are delighted to see innovative, emerging companies becoming the growth companies of tomorrow.”

The new group would have had revenue of 3.8 billion pounds last year, making it the world’s biggest online betting and gaming company, and the deal will achieve pretax synergies of about 140 million pounds a year, according to the statement.

Still, the combined company’s U.K. presence could create competition concerns.

“The combination of both companies could trigger combined market shares exceeding 30%, which would result in an in-depth investigation in the U.K.,” analysts at Kepler Cheuvreux said in a research note.

Flutter’s chairman, CEO and chief financial officer will assume the same roles in the new group.

Goldman Sachs International and PJT Partners were financial advisers to Flutter. Barclays Plc, Moelis & Co. and BMO Capital Markets advised Stars.