Sunnyvale, Calif. -- Following months of negotiations, Sunnyvale-based Yahoo said it has reached a deal to sell half its stake in Alibaba Group back to the Chinese e-commerece company for $7.1 billion. Under the complex agreement, Yahoo would receive $6.3 billion in cash and up to another $800 million in stock for a 20% stake in Alibaba, which would be valued at approximately $35 billion. Yahoo also would be able to eventually sell another quarter of its stake through an eventual initial public offering (IPO), and the remainder at a future point in time. "Today's agreement provides clarity for our shareholders on a substantial component of Yahoo's value and reaffirms the significance of our relationship with Alibaba," said Ross Levinsohn, Yahoo's interim CEO. The deal follows a tumultuous period for Yahoo, which earlier this month installed Levinsohn following the resignation of CEO Scott Thompson, who had been under fire for allegedly misrepresenting his academic credentials.