Aetna said this week that it was curtailing its presence on the Obamacare exchanges to stem mounting financial losses.

Last month, the company told the Department of Justice that it would probably be forced to withdraw from Obamacare altogether if the agency blocks its pending merger with Humana (HUM) over antitrust concerns.

"[W]e believe it is very likely that we would need to leave the public exchange business entirely and plan for additional business efficiencies should our deal ultimately be blocked," Aetna (AET) CEO Mark Bertolini wrote in a July 5 letter.

The letter was obtained by the Huffington Post following a Freedom of Information Act request.

Aetna's announcement that it would withdraw from 11 of 15 states next year amid $430 million in losses heightened concerns about Obamacare's financial viability. UnitedHealthcare (UNH) and Humana are also minimizing their presence on the exchanges after recording big losses.

But the pullbacks also come as two pairs of major insurers are planning to merge. Anthem (ANTX) has offered $54 billion to acquire Cigna (CI), while Aetna would pay $37 billion to take over Humana.

Last month, the Justice Department filed suit against the companies to block their mergers.

Related: Will Obamacare survive as insurers pull out?

Some experts thought it strange that Aetna, which had voiced support and optimism about Obamacare earlier this year, suddenly canceled its plans to expand into more states and review its participation in its current markets.

Soon after the Justice Department filed its suit, Anthem also tied its continued participation on the exchanges to its merger.

"As shared with the DOJ, our acquisition of Cigna will help stabilize pricing in this volatile market, enabling Anthem to continue its commitment to the public exchanges, and provide the opportunity to expand our participation to nine additional states, where neither Anthem nor Cigna currently participate," Anthem CEO Joseph Swedish said last month.

Related: U.S. sues to block 2 major healthcare mergers

Aetna's Bertolini, meanwhile, wrote the letter in response to the Justice Department's query into what the likely consequences would be if it blocked the merger. He noted that "the acquisition of Humana puts Aetna in a significantly better position to continue and expand its support."

In the letter to DOJ, Bertolini said Aetna has been operating in the exchanges at a "substantial loss" and said it would be "some time before we recoup our investment."

Acquiring Humana will give it deeper reserves to weather the losses, he said.

"Our ability to withstand these losses is dependent on our achieving anticipated synergies in the Humana acquisition," he wrote. "Our analysis to date makes clear that if the deal were challenged and/or blocked we would need to take immediate actions to mitigate public exchange and ACA small group losses."

The Department of Health & Human Services declined to comment on the letter.

Related: Aetna to pull out of most Obamacare exchanges

An Aetna spokesman told CNNMoney Wednesday that the company wrote the letter in response to a Justice Department request. Since then, Aetna found that its performance on the exchanges in the second quarter "showed a significant deterioration."

"That deterioration, and not the DOJ challenge to our Humana transaction, is ultimately what drove us to announce the narrowing of our public exchange presence for the 2017 plan year," said Aetna spokesman TJ Crawford.