WASHINGTON (Reuters) - AT&T Inc won court approval on Tuesday to buy Time Warner Inc for $85 billion, rebuffing an attempt by U.S. President Donald Trump’s administration to block the deal and likely setting off a wave of corporate mergers.

The deal, which could close next week, is seen as a turning point for a media industry that has been upended by companies like Netflix Inc and Alphabet Inc’s Google which produce content and sell it online directly to consumers, without requiring a pricey cable subscription. Cable, satellite and wireless carriers all see buying content companies as a way to add revenue.

Trump, a frequent detractor of Time Warner’s CNN and its coverage, denounced the deal when it was announced in October 2016. U.S. District Judge Richard Leon found little to support the government’s arguments that the deal would harm consumers, calling one position “gossamer thin” and another “poppycock.”

The ruling could also prompt a cascade of pay TV companies buying television and movie makers, with Comcast Corp’s bid for some Twenty-First Century Fox Inc assets potentially the first out of the gate.

The merger, including debt, would be the fourth largest deal ever attempted in the global telecom, media and entertainment space, according to Thomson Reuters data. It would also be the 12th largest deal in any sector, the data showed.

In a scathing opinion bit.ly/2Jxx6qE, Leon concluded that the government had failed to show competitive harm and urged the U.S. government not to seek a stay of his ruling pending a potential appeal, saying it would be "manifestly unjust" to do so and not likely to succeed.

“That’s a legal shocker,” said J.B. Heaton, an attorney and consultant on litigation and regulatory proceedings. “I think we’ll see now that companies will be much more confident about vertical mergers,” he added, referring to deals where a company merges with a supplier.

Shares of AT&T fell about 1.3 percent in after-hours trade following the decision, while Time Warner rose more than 5 percent.

Twenty-First Century Fox jumped 7 percent in extended trade after the ruling on expectations that Comcast and Walt Disney Co could start a bidding war to acquire its media assets. Comcast and Walt Disney dropped 4.3 percent and 1.8 percent, respectively.

Shares of other media and telecom companies also rose, including T-Mobile US Inc, Sprint Corp, CBS Corp, Dish Network Corp, Discovery Inc and Viacom Inc.

“This will be a blockbuster summer for media mergers,” said Mary Ann Halford, senior adviser to OC&C Strategy Consultants.

Shares of Express Scripts Holding Co, which is set to be bought by Cigna Corp for $52 billion, rose 4.8 percent, while shares of health insurer Aetna Inc, due to be acquired by CVS Health Corp for $69 billion, rose 3.6 percent.

Opponents of the AT&T decision also predicted more deals.

Slideshow ( 4 images )

“Consumers should fear a cascade of unchecked mergers and acquisitions to further consolidate the telecom industry resulting in less choice, fewer competitors and higher prices,” Senator Richard Blumenthal, a Democrat, said in a statement.

The Justice Department filed a lawsuit to stop the deal in November 2017, saying that AT&T’s ownership of both DirecTV and Time Warner would give AT&T unfair leverage against rival cable providers that relied on Time Warner’s content, such as CNN and HBO’s “Game of Thrones.”

Leaving the courtroom, Makan Delrahim, head of the Justice department’s antitrust division, said that he would read the judge’s opinion before making a decision on an appeal.

Slideshow ( 4 images )

The Justice Department is not likely to be put off by the loss, said Amy Ray of the law firm Cadwalader, Wickersham & Taft LLP, noting it had prevailed in stopping other mergers between rivals.

“Put me on the side of the fence of thinking that AAG (Makan) Delrahim is interested in challenging the next problematic vertical transaction,” she said.

Cornell law professor George Hay added that the ruling found the government’s evidence lacking, rather than a broader determination of how vertical mergers affected competition.

AT&T in a six-week trial argued that the purchase of Time Warner would allow it to gain information about viewers needed to target digital advertising, much like Facebook Inc and Google already do.

AT&T can use the content from Time Warner to fill its streaming services DirecTV Now and soon-to-be-launched AT&T Watch, which are cheaper online video packages with fewer channels. That could give it a leg up over rival live streaming platforms that do not own content, media analysts have said.

AT&T applauded the court’s decision and said it expected to close the merger before the June 21 contractual deadline.

The government estimated costs to industry rivals, such as Charter Communications Inc, would increase by $580 million a year if AT&T owned Time Warner.

Before the trial started, AT&T lawyers said the Time Warner deal may have been singled out for government enforcement but the judge rejected their bid to force the disclosure of White House communications that might have shed light on the matter.

The deal cost AT&T’s top lobbyist, Bob Quinn, his job in May after it became public that AT&T had paid Trump’s personal lawyer Michael Cohen $600,000 for advice on winning approval.

Burns McKinney, a portfolio manager at Allianz Global Investors who owns AT&T, said he would not say the telecoms company had won a huge victory.

“It’s more that they just didn’t lose. You always wonder in these cases if there’s a winner’s curse, given the risk (AT&T) can’t get the desired synergies and they’re taking on a lot of debt with the merger,” he said.