Chinese e-commerce giant and parent company of small business B2B portal alibaba.com used by over one million UK businesses, has agreed to buy back about 20 percent of its own company stake from Yahoo, giving the Chinese e-commerce giant greater control over its own operations, and boosting Yahoo's fortunes by over $6 billion.

The agreement also allows Yahoo to cash in on its remaining stake, once Alibaba decides to go public in the future. Alibaba will be required to buy one quarter of Yahoo's current stake at the initial public offering price, or allow Yahoo to sell off those shares.

Yahoo acquired about a 40 percent stake in the Chinese e-commerce giant as part of $1 billion deal made in 2005 that set the companies up as strategic partners, however the partnership never really flowered, and the two companies have been in discussions about Alibaba buying back its stake from Yahoo for some time.

In addition to the share repurchase, the companies have also agreed to amend their existing technology and intellectual property licensing agreement, so Alibaba will continue to operate Yahoo China for Yahoo for the next four years paying $550 million upfront, plus yearly royalties, and Yahoo will licence some of Alibaba's patents, but neither Yahoo or Alibaba say which patents.