Verizon is throwing in the towel on its content business, announcing plans to offload Verizon Media — which encompasses the AOL and Yahoo brands it acquired several years ago — in a $5 billion deal.

The telco on Monday announced a deal with private-equity firm Apollo Global Management to sell Verizon Media. Verizon will retain a 10% stake in the company.

Under the new ownership, the new company will be known as “Yahoo” and will continue to be led by Verizon Media CEO Guru Gowrappan.

Click here to sign up for Variety‘s Media Earnings newsletter.

“We are excited to be joining forces with Apollo,” Gowrappan said in a statement. “With Apollo’s sector expertise and strategic insight, Yahoo will be well positioned to capitalize on market opportunities, media and transaction experience and continue to grow our full stack digital advertising platform. This transition will help to accelerate our growth for the long-term success of the company.”

Verizon spent nearly $10 billion to buy AOL and Yahoo — once among the internet’s biggest and most powerful companies — on the theory that under one roof they would more efficiently reach large audiences and vie with Google and Facebook for digital ad dollars. The telco bought AOL for $4.4 billion in 2015 and closed a $4.5 billion deal for Yahoo in 2017.

But Verizon Media, as the group was named, continued to struggle as the hoped-for revenue growth failed to materialize. After a massive write-down on the assets in 2018 and several rounds of layoffs, Verizon Media in recent quarters appears to have finally stabilized: Revenue at Verizon Media rose 10.4% in the first quarter of 2021, to $1.9 billion, fueled by a 26% rise in ad revenue.

Under Gowrappan, the former Alibaba exec who assumed leadership of Verizon Media in the fall of 2018 after the exit of ex-AOL CEO Tim Armstrong, the telco sold off some of the AOL/Yahoo assets to focus on news, sports, finance and lifestyle content and utilities like Yahoo Mail. That included sales of Tumblr, Flickr, Moviefone, and HuffPost — which is now part of BuzzFeed.

Under the terms of the agreement with Apollo, Verizon will receive $4.25 billion in cash and preferred stock in the new Yahoo worth $750 million, in addition to retaining a 10% stake in the company. The deal, subject to certain closing conditions, is expected to close in the second half of 2021.

Across its brands, Verizon Media says, it draws nearly 900 million monthly active users worldwide. Those include Yahoo (including Yahoo News, Yahoo Finance, Yahoo Sports, Yahoo Entertainment), AOL, tech-news sites TechCrunch and Engadget, content studio Ryot, college-sports site Rivals, women’s storytelling brand Makers, Autoblog, and mobile apps analytics provider Flurry. In addition, the division’s business-to-business Media Platform group provides streaming, content delivery, security and cloud compute services for broadcasters and other customers.

Verizon CEO Hans Vestberg, in announcing the pact, said that during the telco’s strategic review process for the media unit, “Apollo delivered the strongest vision and strategy for the next phase of Verizon Media. I have full confidence that Yahoo will take off in its new home.”

Apollo says it is optimistic that it can spur Verizon Media’s financial growth. “We are big believers in the growth prospects of Yahoo and the macro tailwinds driving growth in digital media, advertising technology and consumer internet platforms,” David Sambur, senior partner and co-head of private equity at the firm, said in a statement. “Apollo has a long track record of investing in technology and media companies and we look forward to drawing on that experience to help Yahoo continue to thrive.”

Investment firm LionTree served as lead financial adviser to Apollo Funds on the deal, alongside RBC Capital Markets, Barclays, BMO Capital Markets, Deutsche Bank and Mizuho Securities USA — each of which also is providing financing for the transaction.

By the way, the core part of Verizon Media is still legally known as “Oath Inc.,” the name of the combined AOL-Yahoo group that Armstrong picked before the company started referring to it as Verizon Media in early 2019.