AT&T has received approval from a US court to buy Time Warner for $85 billion.
The deal will allow AT&T compete with internet companies that dominate digital advertising and providing new sources of revenue.
The planned deal is seen as a turning point for a media industry that has been upended by companies like Netflix and Google which produce content and sell it online directly to consumers, without requiring a pricey cable subscription.
Distributors including cable, satellite and wireless carriers all see buying content companies as a way to add revenue.
The ruling could also prompt a cascade of pay TV companies buying television and movie makers, with Comcast's for some Twenty-First Century Fox 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.
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."
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 and Alphabet's Google already do.
AT&T and other wireless carriers need to find new sources of revenue as the mobile phone market stagnates and more customers abandon pricey cable and satellite packages for streaming services they can watch on their phones or televisions.
The US government estimated costs to industry rivals, such as Charter Communications, would increase by $580m a year if AT&T owned Time Warner.
To assuage the Trump administration's criticisms, AT&T offered to submit pricing disagreements with other pay TV companies over Turner's channels to third-party arbitration.
The companies further offered not to black out programming during arbitration for seven years.
Announced in October 2016, the deal was quickly denounced by Donald Trump, who as a candidate and later as president has been critical of Time Warner's CNN and its coverage.
Before the trial started, AT&T lawyers said the Time Warner deal may have been singled out for government enforcement but Judge Richard Leon of the U.S. District Court for the District of Columbia 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.
The ruling could also have implications for CBS's potential tie-up with Viacom, which is already uncertain because of a lawsuit between CBS's controlling shareholder, Shari Redstone, and its board.