Regal Entertainment Group, the second-largest theater chain in the United States, has agreed to sell itself to British exhibitor Cineworld Group in a deal valuing Regal at $3.6 billion, the company said Tuesday.

Cineworld, Britain’s biggest cinema operator, would pay $23 a share for Regal, which runs 561 theater locations. If the deal closes, it would turn Cineworld into the world’s No. 2 exhibitor, instantly putting it in direct competition with industry giant AMC Entertainment.

Cineworld, headquartered in London, operates 232 theaters in Britain, Ireland and other countries. Buying Regal would instantly give it huge access to the world’s largest movie market, noted Eric Handler, an analyst at MKM Partners.

“It’s not often you can come into a market and be one of the biggest players,” Handler said.

If consummated, Cineworld’s purchase of Regal would be the latest example of consolidation in the cinema business. Theater chains are combining as they face growing competition from at-home entertainment, including streaming services such as Netflix.

It also means the two biggest U.S. movie theater chains would be owned by foreign players.

Leawood, Kan.-based AMC Entertainment — owned by China’s Dalian Wanda Group — bought Carmike Cinemas last year for $1.2 billion, thereby surpassing Regal as the United States’ largest cinema operator. AMC has also bought London-based Odeon & UCI Cinemas Group, as well as Nordic Cinema Group, to expand its international presence.

“With what AMC is doing in Europe, it seems to me Cineworld was compelled to respond,” said Tuna Amobi, a media and entertainment analyst at CFRA Research. “For cinema owners, cross-boarder deals are going to be the way to play this scale game.”

Greater size could help both Cineworld and Regal weather an increasingly difficult climate for theater chains, which have faced long-term declines in admissions and swift changes in consumer behavior.

U.S. cinema owners have struggled this year as multiple major films flopped. Ticket sales in the U.S. and Canada are down 4 percent from the same time a year ago, according to ComScore. The sluggishness, especially during the key summer months, has depressed theater stocks.