Morrison Foerster has advised Toshiba on a $18 billion deal to sell its chip unit to a consortium led by Bain Capital, which turned to Ropes & Gray for advice.

Japanese firms Nishimura & Asahi and Nagashima Ohno & Tsunematsu were also involved in the deal, advising on local law for Toshiba and Bain, respectively.

The Bain-led consortium also includes tech companies Apple, Dell, Hoya, Kingston, Seagate, SK Hynix. Akin Gump advised Kingston.

According to Reuters, the sale of the unit – the world’s second largest producer of NAND chips – was agreed on in September after a drawn-out auction process, but the signing was delayed because Apple demanded new terms on chip supply.

Pressure from the Japanese government, shifting alliances among suitors, and a barrage of revised bids has stretched the auction over nine months, reported Reuters. The lengthy process raised the risk that the sale may not close before the end of Japan’s financial year in March as regulatory reviews usually take at least six months.

If the acquisition is not completed before then, Toshiba – hurt by liabilities at its now-bankrupt nuclear unit Westinghouse – is likely to end a second consecutive year in negative net worth, putting pressure on the Tokyo Stock Exchange to take away its listing status.

The deal also faces legal challenges from Western Digital, Toshiba’s chip venture partner and a rejected bidder, which is seeking an injunction to block any transaction that does not have its consent.

Ropes’ Tokyo office managing partner Tsuyoshi Imai led the deal for the firm, with assistance from counsels Saeko Inaba and Ben Morris. Also involved in the deal were partners Will Shields, Ruchit Patel, Randall Bodner, John Bueker, Anne Johnson Palmer, Thomas Holden, Paul Scrivano and Megan Baca.

The Akin Gump team was headed by corporate partner Paul Lin, and included partners Jeffrey Kochian, Carlos Bermudez and Kevin McBride.