Alibaba Group Holding Ltd., China’s largest e-commerce provider, agreed to repurchase about a 20 percent stake in itself from U.S. Web portal Yahoo! Inc. (Nasdaq: YHOO) for about $7.1 billion ahead of a potential initial public offering.

Yahoo will receive at least $6.3 billion in cash and as much as $800 million in newly issued Alibaba preferred stock, the companies said in a statement today. At the time of an IPO, Alibaba will be required to either buy back a quarter of Yahoo’s current stake or let Yahoo sell the shares. The deal values Alibaba at about $35 billion.

Alibaba Chief Executive Officer Jack Ma may ready an IPO following the success of last week’s offering by Facebook Inc. and projected 42 percent growth this year in China’s online shopping industry. The former English teacher owns about 7.4 percent of Alibaba Group, according to a Hong Kong stock exchange filing last month, making his stake worth $2.6 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,” Ma said in the statement.

Yahoo acquired about a 40 percent stake in Hangzhou, China- based Alibaba in 2005 in exchange for $1 billion and ownership of Yahoo’s Chinese operations. At the time, Yahoo had a market capitalization of $49.2 billion, according to data compiled by Bloomberg. Its market value of $18.8 billion on May 18 is about half the value placed on Alibaba in the deal.

Yahoo Turnaround

Alibaba’s revenue rose to $2.3 billion in the year ended Sept. 30 from $1.3 billion a year earlier, according to Yahoo’s annual report in February. The Chinese company posted a profit of $268 million, compared with a loss of $10.7 million a year earlier, according to the document.

“As e-commerce in China continues to grow, Alibaba is a very attractive asset,” said Duncan Clark, chairman at BDA China in Beijing, which advises technology companies. “Alibaba is in a better position now to do an IPO. The competitive pressures are increasing, and the need to reward staff and make acquisitions means it’s helpful for them to list.”

Alibaba has been trying to buy back the stake for more than a year and stepped up efforts in September because of improving prospects for growth and expansion beyond China. While the deal reduces Yahoo’s presence in China, the world’s largest Internet market, it may aid turnaround efforts as the portal competes with Google Inc. and Facebook for users and advertising dollars.

Royalty Payment

“The $35 billion price tag placed on Alibaba is on the low end,” said Jiong Shao, head of China strategy at Macquarie Securities in Hong Kong. “This is the most valuable asset that Yahoo has.”

That valuation compares with the HK$398.8 billion ($51 billion) market capitalization of Tencent Holdings Ltd., China’s biggest Internet company, and $40.3 billion for Baidu Inc., the biggest Chinese search-engine company.

Yahoo intends to return “substantially all” of the cash proceeds, after taxes, to shareholders, the company said. While the form of the returned capital hasn’t been finalized, Yahoo increased its share buyback authorization by $5 billion with the agreement, the company said.

In addition, Alibaba will make an upfront royalty payment of $550 million and continuing royalty payments for as many as four years.

Investor Financing

The companies also agreed to amend their technology and intellectual property licensing agreement, granting Alibaba a transitional license to operate Yahoo China under the Yahoo brand for as many as four years. Also, restrictions on Yahoo’s ability to make other investments in China will be terminated.

“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,” Yahoo interim CEO Ross Levinsohn said in the statement.

Alibaba plans to finance the transaction from its cash holdings, debt and equity-linked financing, and the deal is expected to close within six months, the companies said. Alibaba is seeking to raise about $2.3 billion from current investors, including Singapore’s Temase Holdings Pte, to help finance the deal, said two people with knowledge of the matter.

UBS AG, Goldman Sachs Group Inc. and Allen & Co. advised Yahoo on the transaction. Credit Suisse Group AG advised Alibaba.

Failed Negotiations

Levinsohn became involved this month after predecessor Scott Thompson resigned following an inquiry into his academic record. Thompson said in April that Yahoo was in active discussions with Alibaba about monetizing a portion of its stake.

“The sale of half of Yahoo’s Alibaba stake would represent the partial achievement of a goal that has eluded Yahoo for years,” Clayton Moran, an analyst at Benchmark Co., said in an e-mail. “It appeases shareholders, may give employee morale a much-needed boost, and starts CEO Ross Levinsohn’s term with a win.”

Yahoo, based in Sunnyvale, California, rose 3.7 percent to $15.42 at the close in New York on May 18. The shares have fallen 4.4 percent this year.

The two companies struggled to make headway on negotiations under Thompson’s predecessor, Carol Bartz, who failed to reach an agreement to let Alibaba Group buy back shares in 2010.

‘Inappropriate’ Ownership

Fissures became public by January 2010 when Alibaba Group described Yahoo’s support for Google, which tangled with Chinese authorities over censorship rules, as “reckless.”

The rift widened in May 2011 after the Web portal said the Chinese company spun off its Alipay online payment business without informing shareholders. Yahoo said it wasn’t consulted about the transfer of Alipay to a company mostly owned by Ma.

It’s “inappropriate” for Internet companies in China to have high foreign ownership given the increasing regulations on overseas investments in the industry, Alibaba Group Chief Financial Officer Joseph Tsai said in May 2011.

In September, DST Global and Temasek Holdings Pte were among investors that agreed to buy shares of Alibaba in a transaction valuing the Chinese company at $32 billion, people familiar with the deal said at the time.

Silver Lake and Ma’s Yunfeng Capital were also part of the group that bought as much as $1.6 billion in stock from Alibaba employees, said the people.

Tokyo-based Softbank Corp. owns about 30 percent of Alibaba Group, operator of the Taobao online marketplace for consumers, and the Tmall Internet shopping site.

Taobao accounted for about 90 percent of China’s C2C, or consumer-to-consumer, e-commerce market in the third quarter of 2011, according to a Jan. 12 JPMorgan Chase & Co. report. China’s e-commerce market may expand 42 percent to 1.1 trillion yuan ($174 billion) this year, according to JPMorgan.

Yahoo considered a deal with Alibaba and Softbank that would cut its stake in Alibaba to about 15 percent from about 40 percent, a person familiar with the matter said in December.

In 2007, the company listed Alibaba.com Ltd. in a $1.7 billion offering in Hong Kong, then the biggest IPO for an Internet company since Google’s in 2004.