TOKYO — Toshiba has cleared one of the last remaining hurdles to a planned sale of its microchip subsidiary and moved a step away from the financial brink.

The struggling Japanese conglomerate said Wednesday that it had settled a legal dispute with Western Digital, the American data storage company, that threatened to block the microchip deal. Toshiba is counting on the sale to bring in about $14 billion in much-needed cash after its losses on nuclear power projects in the United States left its finances in tatters.

Toshiba and Western Digital said Wednesday that they had agreed to withdraw a cluster of lawsuits and arbitration claims over the deal that they had filed against each other. Under that deal, Toshiba plans to cede a majority stake in the chip subsidiary to a group of investors led by the investment firm Bain Capital.

“With the concerns about litigation and arbitration removed, we look forward to renewing our collaboration with Western Digital,” Yasuo Naruke, Toshiba executive vice president and chief executive of the microchip unit, Toshiba Memory Corporation, said in a statement.