Yahoo’s internet business has been sold to Verizon Communications for nearly $5 billion in cash.
It will be combined with AOL, another faded internet star, which Verizon bought in 2015.
The deal does not include Yahoo’s valuable stake in Chinese firm Alibaba.
Verizon said the deal for Yahoo’s core internet business, which has more than a billion active users a month, would make it a global mobile media company.
Yahoo CEO Marissa Mayer said: “Yahoo is a company that has changed the world, and will continue to do so through this combination with Verizon and AOL.”
In an email to staff, Marissa Mayer said she was “planning to stay”, adding: “I love Yahoo, and I believe in all of you. It’s important to me to see Yahoo into its next chapter.”
However, the takeover, which is due to be completed in early 2017, raises questions about whether the Yahoo brand could disappear.
AOL chief executive Tim Armstrong said the deal was about “unleashing Yahoo’s full potential”, and creating a major player in mobile media.
Together AOL and Yahoo will have more than 25 brands, including Yahoo Mail, Flickr and Tumblr as well as AOL’s Huffington Post and Techcrunch news sites.
Marissa Mayer, who took the helm at Yahoo in 2012, has made little progress in returning the company to profit.
Last week Yahoo reported a $440 million loss in Q2, but said the board had made “great progress on strategic alternatives”.