Federal antitrust enforcers on Tuesday approved, with concessions, AMC Entertainment Holding Inc.’s proposed $1.2 billion acquisition of rival Carmike Cinemas Inc., a purchase the U.S. Justice Department said would have otherwise threatened to raise ticket prices in parts of Florida, Georgia, New Jersey and Pennsylvania, among other markets.

The complaint, filed in U.S. District Court for the District of Columbia, said the proposed acquisition, on its face, would have also hurt competition in the market for preshow services, driving up prices for cinema advertisers, for instance.

Under the terms of an agreement that was filed simultaneously with the complaint, AMC must divest theaters in 15 local markets across nine states, including in Florida, Georgia, New Jersey and Pennsylvania. The settlement also requires AMC to distance itself from National CineMedia LLC, the country’s largest provider of premovie advertising.

AMC, according to the complaint, is one of the largest investors in National CineMedia. Carmike, meanwhile, is the largest exhibitor in the network of National CineMedia’s main rival, Screenvision Exhibitions Inc. AMC is required to sell off most of its holdings in National CineMedia, or NCM.

The settlement comes in the final weeks of an administration that confronted, through tough antitrust enforcement, a wave of corporate mergers and acquisitions.

In the past year, the oilfield-services companies Halliburton Co. and Baker Hughes Inc. backed out of their merger deal in the face of antitrust scrutiny. In July, the Justice Department sued to block Anthem Inc.’s proposed acquisition of Cigna Corp. and Aetna Inc.’s merger with Humana Inc., saying the deals would amount to “unprecedented consolidation” in the health insurance industry. Federal judges in Washington are expected to rule in the coming weeks on the two health insurance cases.

AMC, which reported nearly $2 billion in U.S. box office revenues in 2015, will become the nation’s largest theatre exhibitor after the deal is completed, the Justice Department said. In a statement, the company said it “expects to complete the transaction expeditiously.” Carmike ranks as the fourth largest, based on total theatres, screens and box office revenue, according to regulators.

“Moviegoers across the United States have benefitted from head-to-head competition between AMC and Carmike that has kept ticket prices in check and delivered a higher quality movie experience,” Renata Hesse, acting assistant attorney general who heads the Justice Department’s Antitrust Division, said in a statement. “Today’s settlement will ensure that movie theatre competition is preserved in 15 local markets where AMC and Carmike currently compete.”

Hesse said AMC’s requirement to reduce its equity stake in National CineMedia and terminate its participation in that company’s business “will promote continued vigorous competition between the two leading cinema advertising networks.”

Michael Bernstein of Arnold & Porter in Washington, lead antitrust counsel for AMC, was not immediately reached for comment. Carmike’s lawyer, Jeffrey Spigel, who leads King & Spalding’s antitrust group, also was not immediately reached.

The two cinema chains, according to the Justice Department’s complaint, compete with each other in markets that include Destin and Miramar Beach, Florida; Cumming, Lithonia and Conyers, Georgia; Rockaway and Sparta, New Jersey; Westfield and Cranford, New Jersey; and Allentown and Center Valley, Pennsylvania.

“If AMC acquires Carmike, AMC would obtain direct control of one of its most significant competitors in the local markets, likely resulting in higher ticket prices and/or a lower quality viewing experience for moviegoers in these areas,” Justice Department lawyers said in the complaint.