The planned merger between Aetna Inc. (NYSE:AET) and Humana Inc. (NYSE:HUM) has been officially called off. Aetna also terminated its plan to sell some Medicare Advantage assets to Molina Healthcare Inc., which was seen as a way to try to win Justice Department approval for the Humana deal. Aetna chief executive Mark T. Bertolini said in a statement, “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.”

The formal conclusion of the deal did not come as a surprise for most. The cancellation came after a court decision blocked the merger on anti-competition grounds. U.S. District Judge John D. Bates upheld the Justice Department’s decision to block the $37 billion deal in a Jan. 23 court ruling. The federal judge said the Aetna-Humana deal would have been anticompetitive and raised prices for consumers.

Aetna and Humana originally announced the deal in July 2015. Last month, Aetna and Humana released a statement saying that they were weighing whether to appeal the decision and extend their agreement. Bertolini said in his 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.”

Humana is strong in the Medicare Advantage business of selling private Medicare plans. The privately run program covers health benefits for 18 million Americans. Government-run Medicare covers the rest of the 55 million people 65 and older, as well as the disabled. Aetna had argued in court that, even with the merger, there would be ample competition for Medicare Advantage.

Humana will receive a $1 billion break-up fee, or roughly $630 million after tax. The breakup fee will grow Humana’s cash to the highest level in at least 20 years. Humana may spend its cash on takeovers of its own. Bloomberg Intelligence estimates Humana has about $12 billion in M&A capacity. The company recently posted a job listing for an M&A analyst, sparking speculation.

Anthem Inc.’s planned takeover of Cigna Corp. is also in jeopardy. A few weeks prior to the announcement of the Aetna-Humana deal, Anthem Inc. and Cigna Corp. announced that they would combine. A year later, the U.S. Justice Department sued to block both transactions. Neither Anthem nor Cigna have announced a formal termination of their merger agreement yet and could still appeal. The deadline for Anthem to save its Cigna deal is April 30, or it must pay Cigna a $1.85 billion breakup fee.

The two big business deals could have reshaped the health insurance by consolidating the five largest insurers into three companies. Humana could now be targeted in a future deal by Cigna or Anthem if they walk away from their own deal. Aetna, which had issued debt to acquire Humana, said it was redeeming the notes for cash.

Get Analysts' Upgrades and Downgrades Daily - Enter your email address below to receive a concise daily summary of analysts' upgrades, downgrades and new coverage with MarketBeat.com's FREE daily email newsletter.