US telecoms giant Verizon has reached a deal with Yahoo to buy the company's core internet business for $350m (£281m) less than originally agreed.
Doubts had been cast over the original deal after it emerged that Yahoo had been hit by two huge cyber attacks.
Following the price cut, Verizon said it was now buying the Yahoo business for about $4.48bn.
Under the new deal Yahoo and Verizon will split the cost of some lawsuits arising from the data breaches.
Verizon wants to combine Yahoo's search, email and messenger assets, as well as its advertising technology tools, with its AOL unit. Verizon bought AOL in 2015 for $4.4bn.
Verizon sees mobile video and advertising as new sources of revenue outside an overcrowded US telecoms market.
Yahoo admitted in December 2016 it had been hit by a large cyber attack in 2013 which affected more than a billion customer accounts.
It had already admitted another breach in 2014 that had affected about half a billion users.
'Fair and favourable'
Under the amended deal Yahoo and Verizon will each be responsible for 50% of any liabilities arising from government investigations and third party litigation related to the data breaches.
Yahoo will still be solely responsible for any liabilities arising from shareholder lawsuits and Securities and Exchange Commission investigations.
Marni Walden, Verizon executive vice president said: "The amended terms of the agreement provide a fair and favourable outcome for shareholders. It provides protections for both sides and delivers a clear path to close the transaction in the second quarter."
The deal does not give Verizon any part of Yahoo's stake in Chinese online retailer Alibaba.
The price tag for the takeover is well below the $44bn Microsoft offered for Yahoo in 2008, or the $125bn it was worth during the dotcom boom.