SAN FRANCISCO — When a withered Yahoo is absorbed by Verizon Communications in the next week or so, it will be the end of an era for one of the pioneering names of the internet age.

It will also conclude the remarkable five-year run of Yahoo’s chief executive, Marissa Mayer, who was paid nearly a quarter of a billion dollars — a generous sum even by Silicon Valley’s lofty standards — while presiding over the company’s continued decline.

Ms. Mayer, now 42, was hailed as a savior when she left Google for Yahoo in 2012. But during her tenure, Yahoo was hit by two of the biggest privacy breaches in history. Advertisers, Yahoo’s bread and butter, fled the service. Users shifted ever more attention to Google, Facebook and other rivals. Yahoo’s staff shrank by almost 50 percent.

The company ended up so weakened that its board had little choice but to sell.

“Everyone acknowledges that it was a difficult situation to come into,” said Brian Wieser, an analyst at Pivotal Research who has studied Yahoo for years. “But the company was not run well under her tenure.”