US telecoms giant Verizon Communications has agreed a deal to buy troubled web firm Yahoo for around $4.8bn (£3.7bn €4.4bn), according to reports.
Verizon said the agreement to buy Yahoo, which has more than 1 billion monthly users, would make it a global mobile media business.
If the deal is concluded, Verizon is expected to merge Yahoo into its fledgling digital-media unit, which includes the AOL business it bought last year for $4.4bn.
Verizon chairman Lowell McAdam said: "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."
Yahoo, an early pioneer of the internet, had put its online services up for sale to the highest bidder several months ago.
Verizon, with a market cap of roughly $225bn and around $4.5bn in cash on its balance sheet, hopes video-service sales and online ads will grow its enlarged digital unit.
The sale would also mark the end of Yahoo as an operating company, leaving it solely as the owner of a 35.5% stake in Yahoo Japan, as well as its 15% interest in the successful Chinese e-commerce firm Alibaba.
Over a number of years, Yahoo has lost ad sales to larger rivals such as Google, Facebook and Amazon.
"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."
She added: "Yahoo and AOL popularised the Internet, email, search and real-time media. It's poetic to be joining forces with AOL and Verizon as we enter our next chapter focused on achieving scale on mobile."
The group said combined, AOL and Yahoo combined will have more than 25 brands across the portfolio, including Yahoo Mail, Flickr and Tumblr, as well as AOL's Huffington Post and Techcrunch news sites.
Mayer, who took the helm in 2012, has made little progress in returning the company to profit.
Last week the firm reported a $440m loss in the second quarter of its year, but added that the board had made "great progress on strategic alternatives".