Toshiba, a staple in Japan’s economy for more than 140 years, has selected a consortium led by the Japanese government as the preferred bidder for its memory business.

Toshiba said it selected the consortium, consisting of Innovation Network Corporation of Japan, Bain Capital Private Equity LP and Development Bank of Japan, because it presented the best proposal in terms of valuation and respect to certainty of closing, retention of employees and maintenance of sensitive technology within Japan. That last bit is important as Japan didn’t want trade secrets leaving the country.

Terms of the deal were not disclosed although analysts have previously estimated Toshiba Memory Corporation to be worth around $20 billion.

In its announcement, Toshiba said it intends to reach an agreement for purchase with the consortium before its annual shareholders meeting on June 28. Assuming that goes as planned, the Japanese tech giant would like to close on the transaction by March 2018, pending regulatory approval and so forth.

Toshiba, known as Tanaka Engineering Works until it merged with Tokyo Electric in 1939, has struggled as of late. Shortly after finalizing its purchase of OCZ, Toshiba got wrapped up in an accounting scandal in which profits were inflated by as much as $1.2 billion. That incident resulted in the resignation of CEO Hisao Tanaka.

In late 2015, Toshiba sold its image sensor business to Sony for $155 million before slashing 7,800 jobs.