Western Digital Corp. (WDC) - Get Report has sought a court injunction in California to prevent Toshiba (TOSYY) from selling its chip business, a move that could throw doubt over the much-needed sale that could be worth more than $20 billion.

Western Digital late Wednesday said several SanDisk subsidiaries have sought preliminary injunctive relief in the Superior Court of California for the County of San Francisco to prevent Toshiba from transferring its three NAND flash-memory joint ventures operated with Western until the result of the arbitration is known.

The move puts into doubt Western Digital's place in the bidding process for the unit, which could fetch Toshiba up to $20 billion. Other bidders include Foxconn (FXCNY) , also known as Hon Hai Precision Industry (HNHPF) , which is leading a consortium that includes Apple Inc (AAPL) - Get Report , computing giant Dell Inc and Kingston Technology Co.

Western Digital lodged a request with the International Court of Arbitration last month to block the planned disposal of the unit by Toshiba, claiming the Japanese company breached the joint venture agreements with its SanDisk unit by moving JV operations into a separate memory unit business.

In response, Toshiba in early June rolled back on its plan to spin out its joint venture into a wholly owned subsidiary, transferring it back to the conglomerate.

Western Digital CEO Steve Milligan said the company has been working to reach an agreement that is beneficial to stakeholders.

"Toshiba Corporation's attempts to circumvent our contractual rights have left us with no choice but to take this action," he said. "It is our concern that, left unchecked, Toshiba would pursue a course that clearly violates these rights and also runs decidedly counter to the best interests of the JVs and also to the hard working people at Toshiba Corporation's NAND Flash business in Japan." 

"Western Digital's desire to work collaboratively with Toshiba for the benefit of the JVs and Japan is stronger than ever, and we will continue to pursue a solution that is in the best interests of all parties," Milligan added. 

Western Digital said the anti-transfer provisions of the relevant agreements between Toshiba and SanDisk are require that Toshiba obtain partner consent prior to any transfer of JV interests.

Toshiba shares closed at ¥316.5 in Tokyo Thursday after rising just over 1% on the session against a 0.26% decline for the broader Nikkei 225.

 Toshiba has warned that it could collapse if it doesn't sell the newly created Toshiba Memory operations and plug a gaping hole in its finances. The auction has attracted significant interest, including from Western Digital, though the U.S company is not considered to be a frontrunner.

The size of Toshiba's financial hole was confirmed in May when it published unofficial results for the fiscal year ending March, revealing the largest ever net loss by a Japanese industrial group.

The ¥950 billion ($7.6 billion) net loss was twice as large as the ¥460 billion Toshiba tallied over the previous year, after the company booked massive losses from its bankrupt U.S. nuclear unit Westinghouse Electric. Toshiba said it expects to return to profit during the year to the end of March 2018 with a profit of ¥50 billion.

Western Digital lost 2.5% in Wednesday trading to close at $87.80, trimming the year-to-date gain to just under 30%.

Apple and Western Digital are holdings in Jim Cramer's Action Alerts PLUS Charitable Trust Portfolio. Want to be alerted before Cramer buys or sells AAPL and WDC? Learn more now .

Visit here for the latest business headlines