AT&T has agreed to spin off and combine WarnerMedia with its rival Discovery in a multibillion-dollar deal to create a media empire that has the programming heft to compete with Disney and Netflix in a global streaming race.

The move will create the second largest media company in the world by revenue after Disney. It comes just three years after AT&T paid $85.4bn for the owner of CNN, HBO and Warner Bros and reflects the break-neck pace of change for traditional US media groups attempting to reinvent themselves as streaming services.

Under the proposed tie-up, one of Hollywood’s most prized portfolios — including Warner Bros film and television studios, the HBO network and a portfolio of cable channels including CNN — will be brought together with the “real life” output of Discovery, whose brands range from sport and wildlife to home renovation.

David Zaslav, Discovery’s long-serving chief executive, will lead the combined group, which will be 71 per cent owned by AT&T. Jason Kilar, the executive brought in last year to accelerate WarnerMedia’s shift to streaming with HBO Max, was not mentioned in the merger filing.

The new combined company will have an enterprise value of about $132bn, including $56bn in debt. The two companies said they expected about $3bn in annual synergies, which they planned to invest in content and digital innovation. A name has not been confirmed publicly, but the frontrunner being discussed internally is Warner Discovery, according to two people close to the situation.

The transaction represents a humbling retreat for AT&T, which ran up one of corporate America’s biggest debt piles in a gamble to become the world’s biggest vertically integrated content and distribution company. “This should put an end to the debate about synergies between content and distribution,” said Jonathan Chaplin, analyst at New Street Research, who called the deal “complete capitulation”.

The spin-off is the latest in a series of unsentimental deals by John Stankey, who took over as chief executive last year, to unwind the expansionist legacy of his predecessor and refocus the company on its core business. This included selling a 30 per cent stake in DirecTV to private equity group TPG this year, a deal that valued the ailing television business at $16.25bn — roughly a third of what AT&T paid for it six years ago.

The impetus for the Discovery tie-up is the accelerating race between the world’s biggest tech and media companies to catch up with Netflix and own a piece of the future of entertainment. Within the past 18 months alone, Disney, Apple, WarnerMedia, Comcast, Discovery and others have launched streaming platforms with global ambitions.

Writing before the announcement of the deal, Jason Bazinet, analyst at Citi, said he could imagine “several other potential suitors entering the fray” for Discovery or to propose a competing merger with WarnerMedia. “We would not rule out Comcast, Disney or ViacomCBS getting involved,” he wrote.

AT&T and Discovery included significant termination fees under the deal, agreeing to pay $720m or $1.8bn respectively if the deal fell through.

Discovery and WarnerMedia generated combined revenues of $41bn in 2020, which compares with the $65bn turnover of Disney, the world’s biggest media group.

Discovery’s catalogue of low-cost factual programming, sustaining 80 network brands in more than 200 countries and territories, is potentially a valuable complement to WarnerMedia’s own entertainment-heavy library of shows and movies. Meanwhile, WarnerMedia’s financial size and the quality of its catalogue will give Discovery a shot at being one of the top four global streaming services.

While the two companies bring complementary content and geographic footprints, the merger will require a wrenching integration process, potentially wasting the efforts to build and market separate streaming services. Discovery in April said it had reached 15m subscribers across its streaming business, while HBO Max signed up almost 3m subscribers in the first quarter, reaching 9.7m retail subscribers by the end of March.

However, the companies are struggling to keep pace with much larger rivals: Netflix has 208m subscribers globally, while Disney Plus has lured 104m subscribers in only a year and a half since its launch.

The transaction is a victory for Discovery’s two main shareholders, who have backed Zaslav in making an aggressive pivot to streaming, which would either give the traditional television group a future or make it more attractive to suitors. Together John Malone, the billionaire cable and media mogul, and Advance, the investment vehicle for the Newhouse family, the owners of Condé Nast, control about 45 per cent of voting power at Discovery.

Shares in AT&T were up 4.3 per cent in early trading to $33.61 while Discovery was up 4.5 per cent to $37.26.