WASHINGTON — AT&T’s $85.4 billion proposed merger with Time Warner can proceed and does not pose antitrust problems, a federal judge ruled on Tuesday.

U.S. District Judge Richard Leon announced his decision at a hearing at the federal courthouse, gathering all of the parties together for a dramatic coda after a six-week trial.

The decision was definitive, as Leon read from his opinion in the courtroom and concluded that the government had failed to prove that the merger would substantially lessen competition. He imposed no conditions on the transaction.

Time Warner lead attorney Daniel Petrocelli told reporters outside the courthouse that the merger was on track to close June 20.

“We are pleased that, after conducting a full and fair trial on the merits, the Court has categorically rejected the government’s lawsuit to block our merger with Time Warner,” AT&T general counsel David McAtee said in a statement.

The Justice Department has not announced whether it will appeal the case. After he read from his opinion, Leon also strongly suggested that the government not seek a stay pending an appeal.

He said it would be a “manifestly injustice” outcome of the case if the government sought a stay to further delay the merger, costing both companies, which have a $500 million breakup fee and faced a self-imposed June 21 deadline to complete the transaction.

“To use a stay to accomplish indirectly what could not be done directly — especially when it would cause certain irreparable harm to the defendants — simply would be unjust,” Leon said. “I hope and trust that the government will have the good judgment, wisdom and courage to avoid such a manifest injustice.”

Leon also wrote that he was not suggesting that the government not consider an appeal, calling it “fair game,” but he also seemed to be urging them to consider the resources that went into the case. He noted the “staggering cost” of the investigation, litigation and trial, saying that it has “easily” run into tens of millions of dollars for the companies and the government.

With a penchant for exclamation point, Leon wrote in his opinion that “the temptation by some to view this decision as being something more than the resolution of this specific case should be resisted by one and all!”

Makan Delrahim, the chief of the Antitrust Division, told reporters afterward that he was “disappointed. We obviously don’t agree.” He said they are still reviewing the opinion, which is 170 pages.

The Justice Department’s Antitrust Division challenged the vertical merger by arguing that it would ultimately cost consumers. The crux of the DOJ’s argument was that AT&T-Time Warner would use its increased leverage as a bulked up entity to extract higher carriage fees for channels like TBS, TNT, and CNN.

It also argued that the combined company could withhold the use of HBO as a promotional tool by AT&T’s rivals, and that the merger conglomerate would have the incentive to coordinate with another big media company, Comcast-NBC Universal, to try to limit the growth of new streaming upstarts.

Leon found those arguments unconvincing.

In his opinion, he seemed to side with AT&T’s defense that, far from withholding Time Warner content from rivals to gain an advantage, the merged company instead would have the incentive to seek maximum carriage of content across an array of platforms.

He also was receptive to AT&T’s case for sizing up the merger in the context of rapid changes in the media landscape, with the rise of Netflix, Google and Amazon as rivals for consumers and advertisers.

He wrote that he could not evaluate the case “without factoring in the dramatic changes that are transforming how consumers view video content.”

As he read his opinion in the courtroom, Delrahim and the DOJ’s legal team, led by Craig Conrath, listened intently and did not show any emotion.

Outside the courthouse, at a press conference, Petrocelli told reporters that Leon’s “sweeping rejection does not surprise us at all.”

“The government could present no credible proof in support of its theories,” Petrocelli said, adding that the case “shrunk and shrunk and shrunk until there was nothing there by the end of the day.”

The ruling has tremendous implications for future media mergers, as public interest groups and Wall Street analysts predict that it will clear the way for greater consolidation and combinations between content and distribution.

Comcast, for instance, is weighing a rival bid for many of the assets of 21st Century Fox, hoping to usurp The Walt Disney Co.’s agreement to purchase the media properties. Verizon is seen as likely on the hunt for a key content player, and there has long been speculation that a big tech company, like Google, Apple, or Facebook, would try to acquire a traditional Hollywood studio.

UBS’s John Hodulik wrote last week that a favorable ruling for AT&T could serve as a “green light” for other transactions. “This decision will likely serve as the litmus test for other potential M&A and has broad implications for stocks in the cable, telco, and media space,” he wrote in a research note.

Gene Kimmelman, president and CEO of the public interest group Public Knowledge, said earlier this month that the impact of an AT&T victory in the case will be “enormous.” “You are going to see an explosion of vertical mergers — three or four [companies] that gobble up the most valuable properties in the media ecosystem.”

He also predicted that the tech sector would accelerate its vertical integration, but he doesn’t think that will be via a media company. He described what he saw as a “territorial split,” in which the media sector protects its base through consolidation and tech companies see an opening “to entrench themselves in their current businesses and block out potential rivals.”

Kimmelman doubted that if AT&T won, the government could obtain a stay to stop the merger from going forward pending an appeal. He noted that the government would likely have to prove that there was a good chance they will succeed in their case and the merger moving forward would cause irreparable harm, Kimmelman said.

“That is a heavy lift. It may stretch things out somewhat, but I am not sure it will stop the transaction,” Kimmelman said.

Some public interest advocates urged the DOJ to appeal.

“This ruling will open the floodgates, at a minimum, to more vertical mergers of this kind. Comcast will bid for Fox’s assets,” said Gigi Sohn, a former FCC official and fellow at the Georgetown Law Institute for Technology Law & Policy. Other cable and broadband companies will look to merge with the remaining Hollywood studios and other programmers. Even parties seeking horizontal mergers, like Sprint & T-Mobile, will try to use this decision to justify shrinking competitors in the same market.

What is unclear is what impact the ruling will have on the future willingness of the Justice Department to challenge vertical transactions. Delrahim told reporters that he would continue to insist that mergers that pose antitrust problems agree to structural solutions, in which properties are divested as conditions of approval. The DOJ did so in this case — insisting that AT&T-Time Warner shed either DirecTV or the Turner networks, but the companies said that doing so would kill the rationale for the deal.

Instead, they said that Turner networks would agree to go into “baseball-style” arbitration with AT&T’s distribution rivals in the event of carriage disputes. A Time Warner spokesman said that they will continue to honor that offer.

AT&T and Time Warner announced an agreement for a $85.4 billion merger on Oct. 22, 2016, but the deal quickly got swept up in the presidential race. Donald Trump said he would block the merger because it was “too much concentration of power in the hands of too few.”

After Trump was elected, many Wall Street analysts believed that the transaction would ultimately pass antitrust scrutiny with a new Republican administration in charge. Before Delrahim was nominated as the new antitrust chief, he said on Canadian TV that he didn’t see the merger as a “major antitrust problem.” Delrahim later noted that in that same interview, he also said that the transaction nevertheless would still raise concerns.

Less than two months after he was confirmed, Delrahim led the Antitrust Division in challenging the transaction in court. The division filed suit on Nov. 20, 2017, claiming that the merger would give AT&T-Time Warner increased leverage against rivals, driving up the prices competitors pay for the Turner networks. It also claimed that the combined company could withhold rivals’ ability to use HBO, the Time Warner-owned premium service, as a promotional tool to draw subscribers.

AT&T CEO Randall Stephenson fought back, and characterized Trump’s opposition to the transaction and his animosity toward CNN as the “elephant in the room.” In a pretrial hearing, AT&T-Time Warner’s legal team sought to pursue a line of defense that they were unfairly singled out by the DOJ and the White House for antitrust enforcement, given Trump’s attacks on CNN.

Petrocelli told reporters on Tuesday that he had “no insight” on Trump’s role, other than to note that Leon rejected their efforts to seek discovery of White House and Justice Department documents.

Gary Ginsberg, spokesman for Time Warner, was more direct. “The court’s resounding rejection of the government’s arguments is confirmation that this was a case that was baseless, political in its motivation and should never have been brought in the first place,” he said.

The six-week trial — perhaps the most closely watched antitrust case in a generation — featured testimony from Stephenson, Time Warner CEO Jeff Bewkes, and a slew of other corporate executives from the company and from rivals. But much of it hinged on the Justice Department’s ability to prove that the merger would harm consumers.

The DOJ relied on a number of experts to show that pay TV customers would face higher bills — by their account $463 million per year. Chief among them was Carl Shapiro, economist at the University of California at Berkeley, who faced perhaps the most contentious cross-examination from AT&T-Time Warner’s legal team, led by Petrocelli.

Petrocelli attacked Shapiro’s methodology for concluding that the merger would result in a price increase of 45 cents per month per pay TV subscriber. AT&T’s legal team later produced their own witness, Dennis Carlton of the University of Chicago, who claimed that Shapiro’s model was “theoretically unsound.”

Leon, too, found fault in Shapiro’s analysis. At one point during the trial, Leon had called Shapiro’s model a “Rube Goldberg contraption,” and he reiterated that point in his opinion.

“But in fairness to Mr. Goldberg, at least his contraptions would normally move a pea from one side of the room to another,” he wrote in his ruling. “By contrast, the evidence at trial showed that Professor Shapiro’s model lacks both ‘reliability and factual credibility,’ and thus fails to generate probative predictions of future harm” that the government was making.

He wrote that he was left with no “adequate basis to conclude that the challenged merger will lead to any raised costs on the part of distributors and consumers — much less consumer harms that outweigh the conceded $350 million in annual cost savings to AT&T’s customers.”

Read the judge’s ruling: