After years of negotiations, US internet company Yahoo announced it has reached a deal to sell part of its stake in China's biggest internet company, Alibaba Group Holdings Ltd. The deal will see Alibaba buy back half of the 40% stake Yahoo holds in the group for $7.1 billion.

Alibaba will finance the deal with $6.3 billion in cash, as well as around $800 million in Alibaba preferred stock. As part of the deal, Alibaba will also be required to buy back a quarter of the remaining shares at the price of a future IPO, or allow Yahoo to sell them in the expected public offering at a future date.

The deal values Alibaba Group at around $35 billion. "The transaction will establish a balanced ownership structure that enables Alibaba to take our business to the next level as a public company in the future," Alibaba CEO Jack Ma said in a statement to Bloomberg.

It's rumored that Alibaba's CEO, who owns a 7.4-percent share in the group, is readying an initial public offering. Demand is certainly increasing with industry insiders predicting the Chinese online shopping industry will grow by 42-percent this year alone.

The deal also includes the agreement for the Chinese group to use Yahoo's branding for a further four years, for which Yahoo will be compensated with an upfront royalty payment of $500 million, along with further undisclosed payments. More importantly, the deal means Yahoo is now free to invest in the Chinese market.

"Yahoo! intends to return substantially all of the after-tax cash proceeds to shareholders following the closing of the transaction" the company said in a statement. "While the form of the return of capital to shareholders has not yet been finalized, Yahoo!'s board has increased Yahoo!'s share buyback authorization by US $5 billion concurrently with this transaction."

Those familiar with the situation estimate that Yahoo will net around $4 billion from the deal, once taxes have been paid.