Health insurer Cigna announced Tuesday that it will unilaterally terminate its $54 billion merger agreement with Anthem after the deal was rejected by a federal judge. The news came shortly after insurance giants Aetna and Humana announced a mutual decision to abandon their $37 billion merger agreement earlier in the day.

An Anthem spokeswoman said the company is still committed to closing its deal with Cigna, signaling the breakup could be messy. In a news release, Cigna announced it had filed a lawsuit in Delaware Chancery Court against Anthem seeking a judgment that the merger agreement had been terminated lawfully and seeking a $1.85 billion termination fee, along with an additional $13 billion in damages.

“These additional damages include the amount of premium that Cigna shareholders did not realize as a result of the failed merger process,” the company said.

Anthem spokeswoman Jill Becher said that Cigna’s action was invalid and said the company “does not have a right to terminate the agreement.”

“Anthem will continue to enforce its rights under the merger agreement,” Becher wrote.

The dissolution of the Aetna-Humana is proceeding more smoothly. Last month, a federal judge upheld the Justice Department’s decision to block that deal. Aetna will pay Humana a $1 billion breakup fee, the companies said, which will amount to about $630 million after taxes. Humana will update its financial outlook for the coming year this afternoon.

“While we continue to believe that a combined company would create greater value for health care consumers through improved affordability and quality, the current environment makes it too challenging to continue pursuing the transaction,” Aetna chief executive Mark Bertolini said in a statement. “We are disappointed to take this course of action after 19 months of planning, but both companies need to move forward with their respective strategies in order to continue to meet member expectations.”

Thomas Noland, a spokesman for Humana, said in an email that the company had always known that the deal might not go through.

“We have therefore planned carefully for it, and are fully prepared to continue to go forward as an independent company,” Noland said.

The two mergers were first proposed in 2015 and could have reshaped the health insurance landscape in the United States by consolidating the four of the largest insurers into two companies. Both deals were blocked by the Justice Department on antitrust grounds, and two different federal judges upheld those decisions in the last few weeks.