U.S. District Judge Richard Leon handed AT&T Inc. a huge victory Tuesday by approving its $85 billion deal for Time Warner Inc. His decision delivered a stinging defeat to the Trump administration's Justice Department while opening the door for Comcast Corp. to bid for parts of 21st Century Fox and become an international company.

In a sweeping, 172-page decision, Leon emphatically rejected the government's position that the AT&T/Time Warner merger was anti-competitive and harmful to consumers. Instead, he noted, the legacy media companies face huge threats from Netflix, Amazon, and other new entrants, giving consumers a multitude of choices. And Leon said he would even deny the Justice Department's request to stop the AT&T/Time Warner merger if the government appeals, because he did not think it could win.

The decision is likely to produce a flurry of entertainment mergers. Many companies, including Verizon, may be more inclined to buy entertainment companies because the government is less likely to intervene. "For business in general, it's going to be seen as a green light for mergers. I think you'll see a lot of people using it as an opportunity to push mergers they may have been thinking about," said Ed Black, president of the Computers and Communications Industry Association, a trade group in Washington that represents such companies as Amazon, Facebook, and Google.

In essence, the decision is as much a win for Comcast as it is for AT&T, analysts said. In a move that could fundamentally reshape the company, Comcast can now proceed with the all-cash hostile bid for parts of 21st Century Fox. Analysts say that Comcast's bid to buy Fox now faces a higher likelihood of regulatory approval.

As early as Wednesday, Comcast is expected to offer $60 billion for the Fox regional sports networks, the FX cable channel, Fox movie and television studios, Fox international channels, and Fox's 39 percent stake in the Sky satellite-TV business in Europe. Such a bid could increase Comcast's debt to $164 billion, according to Moody's Investors Service, making Comcast the second most indebted company in the world behind AT&T/Time Warner.

Leon announced his decision after the stock market closed on Tuesday, and Comcast shares slumped 4 percent in after-market trading on fears that it would overpay for Fox.

But shares in entertainment companies and potential targets of new deals rose sharply. CBS shot up about 5 percent and Fox jumped 7 percent in after-market trading on hopes that it would be the subject of a bidding war between Comcast and Disney.

Comcast had no comment on Tuesday night. Its potential Fox deal would be similar to AT&T/Time Warner by combining a cable and internet businesses with TV channels, news, sports, and other entertainment.

Justice Department attorneys argued in a six-week trial in a windowless Washington courtroom earlier this year that AT&T could use its control over popular Time Warner cable channels such as HBO, TNT, and CNN to slow the growth of popular streaming services and hike bills for cable-TV customers.

The fear was that AT&T would use its leverage over the must-have shows, in particular HBO's Game of Thrones or NBA games on TNT, to charge Comcast or Verizon more than it would charge itself for distributing Time Warner channels, giving itself a huge advantage, the government claimed.

The Justice Department rarely sues to block a "vertical merger" such as the AT&T and Time Warner, because they are not considered as economically dangerous as "horizontal mergers" — ones in which a company buys direct competitors such as T-Mobile's pending deal for Sprint.

But Salil K. Mehra, an antitrust expert and a professor at Temple University's Beasley School of Law, said "this is a brave new world in which leverage issues and the data collection on individuals make it harder to predict what will happen."

In the past, antitrust regulators didn't seem to be bothered if auto manufacturers owned the companies that stamped out fenders or auto bodies. But now the government seems to have grown concerned about the massive reach of new telecommunications and tech companies such as  Facebook that warehouse personal information on users and sell targeted advertisements, Mehra said.

"Consumers may not notice the difference if this one deal goes through because they are already getting crushed in the marketplace," said Susan Crawford, a professor at Harvard Law School and author of Captive Audience, on the Comcast/NBCUniversal merger. The Justice Department "did a good job just focusing on this merger. and how it would be abusive, not just bad."

AT&T and Time Warner announced their deal on Oct. 22, 2016, in the midst of the bitterly contested presidential campaign between Donald Trump and Hillary Clinton.

"AT&T is buying Time Warner, and thus CNN," Trump told an audience at a campaign stop in Gettysburg, calling the proposed merger an example of a media "power structure" that was working to suppress his vote and the voices of his supporters. It was, Trump said, "a deal we will not approve in my administration."

Once he became president, Trump has regularly called CNN "fake news," and in July 2017 he posted on Twitter a doctored video of him beating up a representation of a CNN journalist.

In addition, Makan Delrahim, the Trump appointee and head of the Justice Department's Antitrust Division, made it clear in 2017 that he did not believe that temporary merger conditions that restricted big corporations in the past worked as intended, leading to anti-competitive behavior.

The Justice Department wanted AT&T to divest itself of CNN parent company Turner Broadcasting or DirecTV, the big satellite-television operator, to gain Justice Department approvals for the deal.

AT&T refused to divest assets and the Justice Department sued to block the deal in November.

Leon — who presided over the Justice Department's suit against Comcast's acquisition of NBCUniversal that was settled with a consent decree — told both sides he would announce his decision on AT&T Tuesday at 4 p.m., giving the company and the Justice Department time to settle the case. They didn't.

Gene Kimmelman, a former DOJ antitrust official who now leads the consumer advocacy group Public Knowledge, told the Washington Post that if the government lost the case, "they'll face an avalanche of new transactions."