Phone giant Verizon will blend Yahoo, one of the Internet’s oldest and best-known properties, with AOL — which it bought last year — as part of a $4.83 billion deal the companies announced this morning.

They expect the agreement to close by early 2017, following approvals by shareholders and antitrust officials. It would leave Verizon with more than 25 internet brands including Yahoo’s assets in mail, social media platform Tumblr, news, lifestyle media, and entertainment. Yahoo Mail has more than 225 million monthly active users.

The combined Yahoo and AOL properties will be run by Marni Walden, Verizon’s EVP and President of the Product Innovation and New Businesses organization.

The agreement ends a Yahoo CEO Marissa Mayer’s failed effort since 2012 to revive Yahoo’s status as a Silicon Valley icon. She sought to beef up the company with deals including a $1 billion acquisition of Tumblr and $650 million for BrightRoll, and efforts to create splashy, ad-friendly media properties.

They didn’t boost revenues, though, as Yahoo struggled to keep up with more potent rivals including Google and Facebook. Its stock lost 22.5% of its value since the beginning of 2015 — even with an 18.4% increase in 2016 as the board finally put the assets up for sale in an auction that received final bids last week.

“The acquisition of Yahoo will put Verizon in a highly competitive position as a top global mobile media company, and help accelerate our revenue stream in digital advertising.” Verizon CEO Lowell McAdam says.

The transaction only covers Yahoo’s core assets and real estate — not its shares in Alibaba Group and Yahoo Japan, convertible notes, and non-core patents. Yahoo will continue to own them after changing its name and registering as a new, publicly traded company. It says it will provide details “at a future date.”

In a Tumblr message addressed to “Yahoos,” Mayer says that she’s “planning to stay. I love Yahoo, and I believe in all of you. It’s important to me to see Yahoo into its next chapter.” She didn’t say whether that would extend beyond a transition period or whether she would go to Verizon or stay with the entity holding the financial assets.

Yahoo vows to return “substantially all of its net cash” to shareholders in a plan it will disclose “at an appropriate time.”

“Yahoo is a company that has changed the world, and will continue to do so through this combination with Verizon and AOL,” Mayer says. “The sale of our operating business, which effectively separates our Asian asset equity stakes, is an important step in our plan to unlock shareholder value for Yahoo. This transaction also sets up a great opportunity for Yahoo to build further distribution and accelerate our work in mobile, video, native advertising and social.”

AOL chief Tim Armstrong says he has “enormous respect for what Yahoo has accomplished: this transaction is about unleashing Yahoo’s full potential, building upon our collective synergies, and strengthening and accelerating that growth. Combining Verizon, AOL and Yahoo will create a new powerful competitive rival in mobile media, and an open, scaled alternative offering for advertisers and publishers.”

Analysts said in an initial wave of reports that they like the deal terms. Verizon can easily afford Yahoo. The telco had more than $5.8 billion in cash on its balance sheet at the end of March and its operations generated $7.4 billion in cash during the quarter.

Adding Yahoo makes Verizon “much more important to the digital advertising industry,” Pivotal Research Group’s Brian Wieser says. It “firmly entrenches Verizon as the number three seller of digital advertising behind Google and Facebook, and one of the largest across all media.”

A combination with AOL also “makes strategic sense from Yahoo!’s standpoint,” says Jefferies Equity Research’s Brian Pitz.