A federal judge gave the go-ahead Tuesday for AT&T to buy Time Warner for $85 billion, ruling against the Justice Department’s lawsuit to block the deal in November.

The decision will make AT&T into a media juggernaut. The company will own not only its telecom business and DirecTV but also Time Warner’s massive television assets, including Turner Broadcasting and HBO. It could lead to more mergers and acquisitions between major companies, including proposed deals from both CVS-Aetna and Sprint and T-Mobile. And it ends a bizarre political storyline that included President Donald Trump’s ongoing battle with CNN and hundreds of thousands of dollars paid by AT&T to Trump’s personal lawyer Michael Cohen.

The decision from Judge Richard Leon, a George W. Bush appointee, comes after a six-week trial in US District Court in Washington, DC.

The Justice Department, which sued in November to block the deal, argued the merger would lessen competition and result in “higher prices and less innovation for millions of Americans.” The companies said the merger was necessary to compete in today’s media landscape and take on competitors such as Netflix and Amazon.

Time Warner and AT&T first proposed the merger in October 2016, ahead of the presidential election. At the time, then-candidate Trump vowed to block it.

“AT&T is buying Time Warner, and thus CNN, a deal we will not approve in my administration because it’s too much concentration of power in the hands of too few,” Trump said at a campaign rally in Gettysburg, Pennsylvania, citing it as “an example of the power structure I am fighting.”

The Department of Justice could appeal Leon’s decision but would have to do so on a tight timeline — the deadline to close the deal is June 21. Assistant Attorney General Makan Delrahim, who heads the department’s antitrust division, said he was “disappointed” by the decision in a statement on Tuesday.

“We continue to believe that the pay-TV market will be less competitive and less innovative as a result of the proposed merger between AT&T and Time Warner,” he said. “We will closely review the court’s opinion and consider next steps in light of our commitment to preserving competition for the benefit of American consumers.”

The AT&T-Time Warner deal was contentious from the get-go

AT&T’s October 2016 announcement of its bid to take over Time Warner marked a potentially blockbuster move in the telecommunications industry. It put AT&T, a juggernaut in television, mobile, and internet and the owner of DirecTV, on track to acquire Time Warner’s assets and all that it would entail — HBO, Warner Bros., and Turner Broadcasting.

The deal was met with near-immediate backlash from Washington, and not just from President Trump. Sen. Bernie Sanders (I-VT) called for the deal to be killed soon after it was announced. A group of Democratic senators, including Elizabeth Warren (D-MA) and Al Franken (D-MN), in June 2017 sent a letter to Attorney General Jeff Sessions asking his department to “closely scrutinize” the AT&T-Time Warner agreement, citing “strong concerns” that the combination could lead to higher prices, fewer choices, and poorer-quality services for Americans.

The administration should kill the Time Warner-AT&T merger. This deal would mean higher prices and fewer choices for the American people. — Bernie Sanders (@BernieSanders) October 23, 2016

Despite the political backlash, whether the government would allow the deal to go through unchallenged was an open question. Traditionally, the Department of Justice hasn’t sought to block vertical mergers — meaning deals where the parties aren’t direct competitors.

Delrahim said before his Justice Department appointment that he didn’t see a major problem with the transaction, though obviously he has since changed his tune. Speaking at a conference hosted by the Open Markets Institute on Tuesday ahead of the ruling, he said the government’s lawsuit was “potentially historic” in its effort to keep a combined AT&T-Time Warner from becoming a “gatekeeper to competition” in cable television.

Why this is a big deal

There are a lot of major corporate deals in the pipeline, and potentially more to come, and the AT&T-Time Warner decision serves as a sort of bellwether of how other companies might do in their merger attempts.

The New York Times points to CVS’s proposed $69 billion acquisition of Aetna, another vertical deal, and Cigna’s offer to buy Express Scripts. Walt Disney is in the process of acquiring the film and television arms of 21st Century Fox for $52.4 billion, and Comcast is likely to throw its hat into the ring for the same assets. Sprint and T-Mobile in April announced they would give a proposed merger another go. While that merger is a horizontal one, the AT&T-Time Warner deal could also have implications of how corporate leaders see their chances there.

How the AT&T-Time Warner deal works out is also an indicator of future consolidation in the media and telecommunications space. The AT&T-Time Warner merger, if completed, would put a lot of content — all of HBO’s shows and movies; channels such as CNN, TNT, and TBS; and Warner Bros. studios — under the umbrella of one distributor.

AT&T says it’s necessary to stay alive against Netflix, Amazon, and YouTube, which offer competing streaming services. But the more consolidation there is, the fewer options there are, and that’s a growing problem in the United States across multiple industries. Four companies control the vast majority of the US air market; millions of Americans have access to just one internet service provider; and President Trump just signed legislation rolling back some bank regulations that is expected to unleash more dealmaking in the financial industry.

US antitrust laws have in recent history been interpreted as largely focused on whether a deal or business practices affects consumer prices. But there are all sorts of other potential negative consequences of consolidation that go beyond whether American consumers will pay more for their cable bills in the immediate future.

Trump’s fight with CNN was a perpetual sideshow in the merger battle

Before he was even elected president, Trump spoke out against the AT&T-Time Warner deal. His perceived antagonism toward it — and, specifically, Time Warner-owned CNN — added an unusual layer to the acquisition.

A lot of questions loomed about what Trump’s animus toward CNN would mean for the deal and the Justice Department’s approach to it, and AT&T went as far as to request White House communications logs that would prove whether Trump meddled inappropriately to block the deal. (Judge Leon denied that request.)

The Financial Times and the New York Times prior to the Justice Department’s lawsuit forecast the government’s attempt to block the merger, but they offered up different accounts of the department’s reasoning. By the FT’s account, the government’s objections were focused on CNN and linked to Trump’s feud to the network. By the Times’s account, the objections were broader.

Vox’s Matt Yglesias reflected on the conflicting narratives at the time:

On the one hand, there’s a story about a dangerously authoritarian administration finally using its powers of office to retaliate against a news outlet it doesn’t like. On the other hand, there’s a story about an administration that promised “populist” governance finally stepping up to the plate on antitrust enforcement.

Another and perhaps even more unusual element in all of this was the revelation that AT&T paid Essential Consultants LLC, a shell company set up by Trump lawyer Michael Cohen, for “insights” into the Trump administration after Trump was inaugurated. Documents obtained by the Washington Post confirmed that AT&T hoped Cohen would provide guidance on the Time Warner deal and steering it through regulatory scrutiny. AT&T confirmed the account, and CEO Randall Stephenson said the decision was a “big mistake.”