A federal judge Wednesday ruled against U.S. health insurer Anthem Inc.’s proposed $54 billion merger with smaller rival Cigna Corp., derailing an unprecedented effort to consolidate the country’s health insurance industry.

The U.S. Justice Department sued in July to stop Anthem’s purchase of Cigna, a deal that would have created the largest U.S. health insurer by membership, and Aetna Inc.’s planned $33 billion acquisition of Humana.

On Wednesday, Judge Amy Berman Jackson of U.S. District Court for the District of Columbia issued the ruling against Anthem’s deal, saying the merger would have worsened an already highly concentrated market and was likely to raise prices.

Last month, a different U.S. judge ruled against Aetna’s proposed deal for Humana.

Government antitrust officials argued that both deals would lead to less competition and higher prices for Americans. The acquisitions would have reduced the number of large national U.S. insurers from five to three.

Jackson had separated the Justice Department’s case into two trials. Her ruling focused only on the first one in which the Justice Department argued the tie-up would hurt the ability of large national employers to get competitive rates for the health coverage they provide workers.

The second trial considered overlaps in the two insurers’ business selling health benefits to individuals, and administering Medicare Advantage coverage to the elderly.

Anthem argued that there was enough competition because large companies with more than 5,000 employees often used multiple smaller players in the national market, but the judge disagreed.

“Regional firms and new specialized ‘niche’ companies that lack a national network are not viable options for the vast majority of national accounts, and they will not ameliorate the anticompetitive effects of this merger,” Jackson wrote.

An Anthem spokeswoman and a Cigna spokesman declined to comment on the decision.

Protecting consumers

Acting Assistant Attorney General Brent Snyder of the Justice Department’s Antitrust Division said the ruling had prevented American consumers from facing higher health insurance premiums and less innovation.

Bill Baer, who was head of the Justice Department’s antitrust division when it decided to sue to block both the insurance deals but has since left the agency, also hailed the decision. “Together with the decision on Aetna and Humana, this preserves five large national providers of critically important health insurance products,” he said.

The fifth player, UnitedHealth Group Inc. was not involved in the deals.

Some Wall Street analysts expect all four of the companies to now move on, although Aetna and Humana have not committed to doing so. Their deal expires Feb. 15.

“The likelihood of success in an appeal would be very low,” Matthew L. Cantor, a partner in the law firm of Constantine Cannon in New York, said. He noted points in the judge’s order about the concentrated national market, the high barrier to entry for competitors, and the companies’ roles as direct competitors.

The deals were announced at a time when former President Barack Obama’s national health care reform law was fully in place and the four insurers were growing in the individual insurance market it established. The insurers said new costs, from higher taxes to investments in new Obamacare products, were driving their need for scale.

That landscape is less certain now. Aetna and Humana have cut back Obamacare enrollment for 2017 after losses, and President Donald Trump and fellow Republicans are weighing a “repeal and replace” path for Obamacare.

More deals may be in the offing, JPMorgan analyst Gary Taylor said in a research note. “Given Anthem and Cigna’s pursuit of Humana in 2015, we think new potential combinations could emerge.” He does not expect shares in either Anthem or Cigna to move given that investors had expected this ruling.

Cigna is entitled to receive from Anthem a $1.85 billion break-up fee if the deal fails to win regulatory approval, according to the merger agreement. The agreement also requires Cigna to have put forth its best effort on that front.

But Anthem and Cigna disagreed about the deal in court, Jackson wrote in her order, with Cigna refusing to sign off on Anthem’s interpretation of how the companies could garner savings.

Anthem is the largest member of the Blue Cross Blue Shield Association and operates BCBS plans in 14 states. It and said it could apply its discounts to Cigna members while Cigna said its collaborations with doctors would save money.

Pre-merger integration was stalled and incomplete, the judge said.