By challenging the transaction in court, the Justice Department signaled that it would have an aggressive approach to so-called vertical mergers between companies with complementary businesses.

In the case of AT&T and Time Warner, which has been renamed WarnerMedia, the wireless provider is considered a content distributor and the media business a content supplier. AT&T said that because the companies did not compete, the merger would yield benefits for customers like lower bills and new shows tailored for mobile devices.

The deal brought together one of the nation’s largest wireless providers with a vast media business that includes CNN in addition to HBO and Warner Bros. AT&T has over 153 million wireless subscribers and also owns the satellite TV service DirecTV.

AT&T has been operating WarnerMedia as a separate group, making it easier to unwind the business if the Justice Department prevailed in court. The group will continue to operate as a separate division, but AT&T can now integrate it more deeply with the parent company. That will give AT&T executives direct control over Turner Broadcasting, which the Justice Department sought to force the company to sell as a condition of the deal.

AT&T had agreed to take a hands-off approach to Turner during the appeal, but it can now make staff changes at the unit and take the lead in negotiating licensing deals with cable operators like Comcast or Charter. Turner includes CNN and the cable networks TNT and TBS, which own rights to broadcast games of major sports leagues like Major League Baseball and the National Basketball Association.

The merger attracted a significant amount of political interest. As a presidential candidate, Donald J. Trump, who has frequently criticized CNN as “fake news,” vowed to block the deal if he was elected “because it’s too much concentration of power in the hands of too few.”

The Justice Department has insisted that political considerations played no role in the decision to fight it.