A federal judge has ruled that Aetna wasn't being truthful when the health insurer said last summer that its decision to pull out of most Obamacare exchanges was strictly a business decision triggered by mounting losses.

U.S. District Judge John Bates concluded this week that Aetna's real motivation for dropping Obamacare coverage in several states was "specifically to evade judicial scrutiny" over its merger with Humana.

Aetna pulled out of Obamacare exchanges in 11 states last August, including 17 counties in Florida, Georgia and Missouri where the Department of Justice argued the merger would wipe out competition.

That decision to retreat from Obamacare came just a month after the Department of Justice blocked Aetna's $34 billion merger with Humana on antitrust grounds.

But Bates said this week the DOJ presented "persuasive support" -- including internal Aetna emails -- for the conclusion that Aetna (AET) withdrew from the Obamacare exchanges in those counties "to improve its litigation position."

"The Court does not credit the minimal efforts of Aetna executives to claim otherwise," Bates wrote in a ruling following a trial over the merger.

He added that Aetna's decision regarding participation in the 2017 exchanges in these counties was "in fact manipulated."

Related: Trump and Obamacare: Where we go from here

Aetna had warned the government it may need to dump then-President Obama's signature healthcare law if the U.S. scuttled its deal with Humana (HUM).

"It is very likely that we would need to leave the public exchange business entirely...should our deal ultimately be blocked," Aetna CEO Mark Bertolini wrote in a letter to the DOJ last July that was obtained by the Huffington Post.

However, Bates said it's clear that "Aetna tried to leverage its participation in the exchange for favorable treatment" from regulators.

The judge said there is "persuasive evidence" that when Aetna later withdrew from the 17 counties in question, "it did not do so for business reasons, but instead to follow through on the threat that it made earlier."

This critique was buried in a 158-page ruling issued by Bates on Monday, in which he blocked Aetna's merger with Humana due to anti-competitive concerns.

The ruling deals a big blow to both companies at a time of great uncertainty in the health care industry now that President Donald Trump has talked about rolling back several key provisions of Obamacare.

Aetna-Humana isn't the only big health care merger in doubt. The DOJ also sued to block the takeover of Cigna (CI) by Blue Cross Blue Shield leader Anthem (ANTX) for anti-competitive reasons.

Aetna declined to comment on specifics of the opinion, including the criticism from Bates, because it's still "reviewing the details."

Related: Even as they repeal Obamacare, Republicans still have to fund it

Last summer, Aetna explained its decision to withdraw from most Obamacare exchanges by saying its individual policies business had lost $430 million since the exchanges opened in January 2014.

However, the judge noted that Aetna kept its support for exchanges in money-losing states like Delaware, Iowa and Virginia -- but dumped Florida, even though that big state was projected to be profitable in 2016.

The ruling quoted an email from Christopher Ciano, president of Aetna's Florida market, to Jonathan Mayhew, head of Aetna's exchange business, showing how stunned he was by the decision to leave Florida.

"I just can't make sense out of the Florida decision. Never thought we would pull the plug all together," Ciano wrote, adding that Aetna was "making money from the on-exchange business."

Mayhew responded by requesting to discuss by phone "instead of email."

Bates said the response from the senior Aetna exec was an example of Aetna's "repeated efforts to conceal a paper trail about this decision-making."

--CNNMoney's Tami Luhby contributed to this report