A federal judge on Wednesday blocked a proposed $48 billion merger of Anthem and Cigna, derailing another effort by top health insurers to reshape the industry by combining.

The ruling, by Judge Amy Berman Jackson of the Federal District Court for the District of Columbia, came two weeks after another federal judge blocked a proposed $37 billion merger between Aetna and Humana on antitrust grounds.

Judge Jackson wrote in her order that she found the Justice Department’s arguments against the deal persuasive, and that putting Anthem and Cigna together would harm customers.

“The evidence has also shown that the merger is likely to result in higher prices, and that it will have other anticompetitive effects,” the judge wrote. “It will eliminate the two firms’ vigorous competition against each other for national accounts, reduce the number of national carriers available to respond to solicitations in the future, and diminish the prospects for innovation in the market.”

Under the merger agreement’s terms, Anthem is obligated to pay Cigna a $1.85 billion breakup fee.

A representative for Cigna declined to comment. A spokeswoman for Anthem also declined to comment.

The merger process between Anthem and Cigna has been notoriously contentious. In September, the Justice Department revealed court documents that showed the two had accused each other of breaching their agreement.

The government argued that the disputes ran counter to a major defense offered by the companies — that the deal could enhance competition by creating billions of dollars in savings. The government argued that such savings required the companies to cooperate in integrating their businesses.

Judge Jackson referred in her order to the disagreements between the companies — she called them “the elephant in the courtroom” — citing testimony by Cigna executives who argued that projections of future cost savings were wrong, and Cigna declining to sign off on Anthem’s findings of fact.

“Anthem urges the court to look away, and it attempts to minimize the merging parties’ differences as a ‘side issue,’ a mere ‘rift between the C.E.O.’s,” she wrote. “But the court cannot properly ignore the remarkable circumstances that have unfolded both before and during the trial.”

The huge mergers involving Anthem and Cigna and Aetna and Humana were announced a year and a half ago. The health insurers sought the deals in part to adapt to changes in the market wrought by the Affordable Care Act and to gain greater clout in their negotiations with hospital systems, which have also been actively merging in recent years.

Together, the two deals would have winnowed the five biggest insurers to three.

Several deals in other industries announced around the time were notable in their ambition, seeking consolidation in a quest for larger scale and lower costs. But the Justice Department under the Obama administration opposed some of the biggest of those proposed mergers, successfully blocking combinations like one between the oil field services providers Halliburton and Baker Hughes.

The Justice Department’s efforts to block Anthem’s deal for Cigna revolved around the argument that diminished competition would lead to higher prices for doctors, hospital and policy holders.

“If these mergers were to take place, the competition among insurers that has pushed them to provide lower premiums, higher-quality care and better benefits would be eliminated,” Loretta E. Lynch, then the United States attorney general, said in July.

Other organizations, including groups representing hospital operators, also testified against the proposed merger.

The deal involving Anthem and Cigna had been seen as riskier than the one between Aetna and Humana because the two companies had significant overlap nationally. In her order, Judge Jackson found that the merger would have harmed customers in the 14 areas where Anthem competes in commercial health insurance, as well as in the Richmond, Va., market for large group customers.