Toshiba Corp. and Western Digital Corp. are close to settling their legal dispute under an agreement that the U.S. company will drop efforts to block Toshiba's $18 billion sale of its flash-memory business in exchange for the extension of their joint venture agreements, according to people familiar with the matter.

Western Digital plans to end arbitration claims in the U.S. to stop Toshiba from selling the chip business to a consortium led by Bain Capital as part of the settlement, said the people, asking not to be identified because the matter is private. The U.S. company would get a guaranteed supply of newer chips from a more advanced plant in Japan being built by Toshiba that it will invest in. The two sides still have to work out several key details and it's possible a final deal will not be reached, the people said.

The partners have been locked in a fierce legal battle since early this year after Toshiba said it would sell the chip business to pay for enormous losses in its U.S. nuclear business. The U.S. company had argued Toshiba needed its consent to sell the business, an assertion the Japanese company disputed. Toshiba needs to raise capital to avoid seeing its shares delisted from the Tokyo Stock Exchange.