A federal appeals court rejected the justice department’s second effort to undo AT&T’s $80bn purchase of Time Warner on Tuesday – dealing a probably decisive blow to opponents of the deal, including Donald Trump.

In its ruling the US court of appeals for the District of Columbia circuit unanimously affirmed a lower court ruling last June that found the 2018 deal was unlikely to harm competition.

A three-judge panel found the trial court “did not abuse its discretion” in approving AT&T’s acquisition of the entertainment giant, saying they found the government’s argument that the judge in case had made clear errors was “unpersuasive”.

Sign up for the US morning briefing

David McAtee, AT&T’s general counsel, said “the merger of these innovative companies has already yielded significant consumer benefits, and it will continue to do so for years to come.” He added: “We trust that today’s unanimous decision from the DC circuit will end this litigation.”

The ruling will stand as one of the most significant losses for the justice department’s antitrust division in a generation.

The lawsuit was the first major antitrust action under the Trump administration – an action that was widely believed to be promoted behind the scenes by the president himself, who had made it a campaign pledge to block the deal and has made no secret of his antipathy for Time Warner-owned CNN.

Four months before the justice department action, in July 2018, Trump had tweeted a meme of a WWE wrestling match with the president smacking down a figure with the CNN logo as its head. The video, which drew widespread condemnation as a presidential threat to press freedoms, came with the hashtags: # FraudNewsCNN # FNN.

AT&T-Time Warner is Godzilla v Rodan: citizens will get squashed Read more

The plaintiff in the case, AT&T, has consistently raised questions over whether the department’s suit was politically motivated, while the justice department denied that politics played any part in its decision to litigate.

Still, the case against the merger was highly unusual since it marked the first time in four decades that the government had litigated a “vertical” merger – one that combined two companies that didn’t compete head-to-head and thus could not be accused of creating a monopolistic trading environment.

Instead, the government argued that an AT&T and Time Warner combination would have the power to force higher pay-TV prices on consumers.

But at trial last year, the government struggled to make its case before the US district judge Richard Leon. According to transcripts obtained by the Wall Street Journal, Judge Leon criticized justice department lawyers for introducing irrelevant or repetitive points.

“Don’t wear out your welcome,” Leon said at one point over the six-week trial.

In appealing against the ruling, the justice department argued that Judge Leon ignored “fundamental principles of economics and common sense”.

In its ruling on Tuesday, the appeals court partially sided with the government, saying Judge Leon had “made some problematic statements, which the government identifies and this court cannot ignore”. But the panel said none of those errors were sufficient to undermine his decision to approve the deal.