Yahoo slashed the price of its core Internet business by $350 million.
The announcement settled concerns that the cyber attacks and how they were handled by the California-based firm might scuttle the acquisition or result in an even deeper cut to the price.
"I think at this point Verizon was just too far down the path, and exiting would have been too embarrassing," analyst Rob Enderle of Enderle Group told.
But, he said, "I would have walked away. It is kind of a foolish bet."
Under revised terms of the delayed deal, Verizon's purchase of Yahoo assets will total $4.48 billion.
Yahoo still faces probes and lawsuits related to the cyber attacks, which affected more than 1.5 billion accounts, and the timing of the disclosures.
Yahoo announced in September that hackers in 2014 stole personal data from more than 500 million of its user accounts. And in December it admitted to another cyber attack from 2013 affecting more than a billion users.
"Enormous hacks, dubious disclosure, bad decisions have all contributed to a decline in value such that Verizon had to renegotiate its bid for Yahoo's assets," Endpoint Technologies Associates analyst Roger Kay said in an emailed comment.
But Verizon was eager to expand its reach into digital advertising, even though the transaction faced setbacks due to the hacks.
"We have always believed this acquisition makes strategic sense," said Verizon executive vice president Marni Walden.
"We look forward to moving ahead expeditiously so that we can quickly welcome Yahoo's tremendous talent and assets into our expanding portfolio in the digital advertising space."
Under the terms of the revised sales agreement, Yahoo will continue to cover the cost of a Securities and Exchange Commission probe into the breaches as well as shareholder lawsuits.
However, other government investigations and third-party litigation related to the hacks will be shared by Verizon and Yahoo.
The deal with Verizon was expected to close by July, and will end Yahoo's run of more than 20 years as an independent company.
Yahoo is selling its main operating business as a way to separate that from its more valuable stake in Chinese internet giant Alibaba, which will become a new entity, to be renamed Altaba, Inc., and will act as an investment company.
Prices of Yahoo shares closed the trading day up nearly 0.9 percent to $45.50, while Verizon had gained nearly half a percent to $49.43.
Yahoo is ramping up security as it grapples with the aftermath of the epic hacks.
Mayer said last month that "approximately 90 percent of our daily active users have already taken or do not need to take remedial action to protect their accounts, and we're aggressively continuing to drive this number up."
Yahoo boasted having more than a billion users monthly in 2016, with more than 650 million of those people connecting from mobile devices.
The SEC reportedly opened an investigation into whether Yahoo should have informed investors sooner about two major data breaches.
US law requires companies that fall victim to such hacks to disclose them as soon as they are deemed to affect stock prices.
"With a billion email accounts compromised, it's a wonder anyone uses the service at all," analyst Kay said in an online post about personal experience with Yahoo Mail.
"Yahoo was never built for the modern era, and its ancient architecture was too clanky to withstand the onslaught of cage rattling besieging the Internet today."
The hacks have been a major embarrassment for a former internet leader that has failed to keep up with Google, Facebook and other rising stars.
Yahoo's most recent earnings report showed the company swung to profit in the final three months of last year, after a massive $4.4 billion loss in the same period of 2015.
Yahoo reported a loss of $214 million for 2016 on revenue that inched up to $5.2 billion from $5 billion in 2015.
Mayer will quit the company's board after its merger with Verizon, according to an SEC filing, though she is expected to remain with the core Yahoo business.
"We continue to be very excited to join forces with Verizon and AOL," Mayer said in a joint release.
"This transaction will accelerate Yahoo's operating business especially on mobile, while effectively separating our Asian asset equity stakes.