NEW YORK—After many months and legal battles, the proposed $48 billion deal for Anthem Inc. (NYSE: ANTM) to buy Cigna Corp.(NYSE: CI) was blocked by a federal judge late last Wednesday. Anthem said it would seek to appeal the decision. Cigna is evaluating its options.

The decision comes soon after another judge halted another mega deal in the insurance sector, Aetna Inc’s proposed bid for Humana Inc., as VMail reported in late January.

“Anthem is significantly disappointed by the decision,” CEO Joseph Swedish said in a statement. “If not overturned, the consequences of the decision are far-reaching and will hurt American consumers.” Anthem “ promptly" plans to appeal and request an expedited hearing to reverse the decision by Judge Amy Berman Jackson of the U.S. District Court for the District of Columbia.

Cigna, for its part, said it “intends to carefully review the opinion and evaluate its options in accordance with the merger agreement.” Its CEO David Cordani said that his company will have an estimated $7 billion to $14 billion of deployable capital, which the company could use if it decided to make other acquisitions.

Financial news reports this week speculated that other insurance deals might be pursued among these and other insurance players.

The news of a definitive agreement to combine the companies was initially announced in July 2015. Among other things, the deal would have had impact on millions of vision care patients, who are covered by vision care plans, as VMail reported.

Problems were raised in July of last year, when the U.S. Department of Justice (DOJ) said it was exploring issues connected to the proposed merger.

At that time, the DOJ and attorneys general from multiple states and the District of Columbia filed a lawsuit seeking to prevent the mega-merger, as well as the Aetna-Humana deal. The suit alleged that the transactions would increase concentration and harm competition across the country, reducing from five to three the number of large, national health insurers in the nation.