Anthem's $48 billion deal to buy Cigna was blocked by a federal judge, putting an end to the second of two massive mergers that would have reshaped the U.S. health care landscape.

The transaction violates antitrust laws by reducing competition among insurers, U.S. District Judge Amy Berman Jackson in Washington ruled Wednesday. With the deal defeated, Anthem owes Cigna a $1.85 billion breakup fee under the terms of the agreement they reached in July 2015.

The deal, along with Aetna's proposed tie-up with Humana, which was blocked last month, would have reduced the ranks of big U.S. health insurers to three from five and made Anthem the largest by membership.

The judge also said the deal would increase prices.

While the Aetna-Humana case primarily focused on the market for private health insurance plans for the elderly, known as Medicare Advantage, the Anthem-Cigna case largely turned on the market for health plans sold to employers. In her ruling, the judge looked at its likely effect on the sale of health insurance to “national accounts” — customers with more than 5,000 employees, usually spread over at least two states — within the 14 states where Anthem operates as the Blue Cross Blue Shield licensee.

“Eliminating this competition from the marketplace would diminish the opportunity for the firms' ideas to be tested and refined, when this is just the sort of innovation the antitrust rules are supposed to foster,” Berman Jackson said in her 12-page order. The judge's accompanying opinion fully detailing her reasons for ruling against the deal was filed under seal.

Matthew Asensio, a spokesman for Cigna, and Jill Becher, a spokeswoman for Anthem, didn't immediately respond to requests for comment on the decision.

Analysts had doubted that the Anthem-Cigna deal could pass antitrust scrutiny.

The Anthem-Cigna deal's failure gives Cigna CEO David Cordani a new chance to shape his company's path. He has estimated that Cigna would have $7 billion to $14 billion of deployable capital by mid-2017 if the purchase wasn't completed.

Anthem has also said it would pursue deals and buybacks as its “Plan B” if the Cigna transaction didn't go through.