AT&T’s politically charged takeover of Time Warner was approved by a US judge on Tuesday in a blow to the Trump administration, which had fought hard to have the deal scrapped.

US district judge Richard Leon dismissed the antitrust case brought by the justice department last November, the culmination of a 20-month ordeal that has seen the deal attacked by Donald Trump, critics of media consolidation and consumer groups.

Leon said the government’s objections “rested on improper notions” and warned against an appeal. “I hope the government has the wisdom and courage” not to seek a stay, he said.

The $85.4bn merger will create a telecoms and media giant combining AT&T’s mobile, cable and satellite TV business with Time Warner’s portfolio of blue-chip media assets.

Sign up to receive the top US stories every morning

Time Warner owns CNN, HBO, home to Game of Thrones and Veep, and Warner Brothers, whose franchises included Batman, the Lego movies and Harry Potter.

Corporate America had closely watched the case and the decision is likely to lead to more mergers. Seats for the ruling at the E Barrett Prettyman courthouse in downtown Washington were in such demand that lines began forming outside the courthouse a full day before the scheduled 4pm announcement.

The decision on a so-called “vertical integration” – between two companies who do not make competing products – could have a profound impact on future mergers. Vertical mergers, such as Amazon’s takeover of Whole Foods and drugstore chain CVS’s purchase of health insurer Aetna, have become increasingly popular.

But the most immediate effect of the deal will be on the already consolidated media market. A clear win for AT&T will embolden Comcast, the US’s largest cable company, to top Walt Disney’s $52bn bid for 21st Century Fox, the media empire controlled by Rupert Murdoch and his family.

Comcast has made clear its intention to challenge that merger and is reportedly preparing a $60bn all-cash offer of its own. Comcast has already made an offer for Sky, the UK satellite TV business. 21st Century Fox owns 39% of Sky and has been in a long battle with UK regulators to buy the rest of the company.

AT&T’s wooing of Time Warner has been politically complicated from the outset. Announced in October 2016, it was seized on by then presidential candidate Donald Trump as the sort of deal his administration would block.

AT&T's Time Warner takeover: justice department aims to block $85bn deal Read more

On the campaign trail Trump argued that a combined AT&T/Time Warner was “too much concentration of power in the hands of too few”. Trump weighed in again after the justice department filed its suit: “Personally, I’ve always felt that that was a deal that’s not good for the country. I think your pricing is going to go up,” he said last November.

Critics charged that Trump had come out against the deal because of Time Warner’s CNN, which has been highly critical of his presidency. The Trump administration has denied those charges.

In May it was revealed that AT&T had paid Michael Cohen, Trump’s personal attorney, $600,000 for consultancy fees as it attempted to woo the White House. AT&T’s chief executive officer, Randall Stephenson, said the hiring had been “a big mistake”.

In court the justice department argued an integrated company would use its size to raise prices and that it was problematic for one company to own a top pay-TV distributor, AT&T’s DirecTV, as well as Time Warner, a company that makes content distributed by DirecTV’s rivals.

AT&T in turn called the government’s arguments “absurd” and has argued the deal is necessary for it to compete with tech companies like Netflix, Apple and Amazon as they spend billions to bolster their positions in media.