Alibaba Group’s plan to repurchase up to half of Yahoo Inc’s 40 percent stake in the company for $7.1 billion has moved the e-commerce leader closer to a public listing. The deal also marks the largest ever M&A transaction between a U.S. and Chinese company.

Fifteen law firms are reported to have been involved in the deal.

Skadden, Arps, Slate, Meagher & Flom acted as Yahoo!’s lead legal counsel; Weil, Gotshal & Manges was legal counsel to Yahoo!; Conyers Dill & Pearman served as Cayman Islands counsel to Yahoo!; Munger, Tolles, & Olson acted as legal counsel to the Yahoo Board of Directors.

On the other side of the table, Wachtell, Lipton, Rosen & Katz acted as lead legal counsel to Alibaba; Freshfields Bruckhaus Deringer advised on financing and Hong Kong legal matters; Fangda Partners served as PRC counsel; Fenwick & West assisted on intellectual property matters; and Maples and Calder served as Cayman Islands legal counsel.

Sullivan & Cromwell advised lead investors CIC International, CITIC Capital, and Boyu Capital. A Paul, Weiss, Rifkind, Wharton & Garrison team represented Silver Lake and Temasek, existing shareholders that increased their investment. Japanese telecommunications company Softbank was counselled by a Morrison & Foerster Tokyo team led by Ken Siegel and Ivan Smallwood.

With regards to Alibaba's $1 billion financing, the eight underwriters were advised by a Hong Kong White & Case team led by John Hartley, King & Wood Mallesons on PRC law and Walkers as to offshore law aspects.

Under the agreement, Reuters reported that Yahoo will sell half its stake in Alibaba for atleast $6.3 billion in cash and up to $800 million in new Alibaba preferred stock. The deal, announced in a joint statement on Monday, caps years of frequent acrimonious talks over how Alibaba could reclaim some or all of the 40 percent stake that Yahoo bought for about $1 billion in 2005.

Yahoo, which has come under fire from shareholders for failing to take aggressive action to reverse a decline in advertising revenue in the face of competition from Google Inc and Facebook, will hand most of the sale proceeds after tax to its stockholders.

A source familiar with the deal said Yahoo built in incentives for Alibaba, which operates the popular Chinese online marketplace Taobao, to hold an initial public offering by the end of 2015. Alibaba would buy back half of Yahoo's remaining stake - a 10 percent holding - at the IPO price, or allow Yahoo to sell those shares in the offering before the end of 2015.

Alibaba Group, valued between $30 billion and $35 billion, listed its Alibaba.com unit in 2007, and agreed to buy it out in February with founder Jack Ma saying that a group IPO would reward employees for their service.

In addition to the share repurchase, Yahoo and Alibaba are slated to amend their existing technology and intellectual property licensing agreement, with Alibaba continuing to operate Yahoo China under the Yahoo brand for up to four years. Yahoo will be freed from restrictions on it making other investments in China. Alibaba, meanwhile, will make an upfront lump sum royalty payment of $550 million to Yahoo, and keep paying royalties for up to four years.

Credit Suisse was lead financial adviser to Alibaba, while Yahoo was advised by UBS. ALB

Kanishk Verghese is North Asia journalist at ALB. Follow him on Twitter: @ALB_Magazine.

Other related stories: