A bidding war has emerged to purchase the best bit of Toshiba, the once-great Japanese tech giant that’s now on life support. As many as eight companies, from hardware players like Apple and Foxconn, to component makers like Western Digital, to software giants like Amazon and Google, have emerged as potential bidders willing to pay tens of billions of dollars for Toshiba’s chip unit, the only valuable part of the company.

If Apple and Foxconn win the deal (the former is reportedly financing a bid from the latter), it would mark a major coup for the two companies. It would make the iPhone cheaper to produce, and therefore more profitable to sell. Yet the win would come at a cost for Japan, as the country would lose yet another one of its iconic technology giants to foreign competitors. (Toshiba, Apple, and Foxconn did not respond immediately to requests for comment, but Quartz will update this piece if they do.)

Most consumers think of Toshiba as a maker of televisions or laptops. But the company’s most important product nowadays is NAND flash memory chips—a component in a number of electronic devices (including phones and laptops) that retains data when a device is powered off. Apple uses Toshiba NAND flash in the iPhone 7 and 7 plus according to iFixit, a site that examines the components inside popular phones.

NAND a significant cost component in the iPhone. According to research firm IHS, the memory component of the iPhone 6 plus costs $22.50, making it one of the more expensive parts of the device.

Last year, Foxconn’s acquisition of Japanese LCD screen maker Sharp marked a major coup for the Taiwanese assembler and Apple, its most important partner. Foxconn primarily oversees only the purchasing and assembly of the iPhone, rather than the actual manufacturing of its most important parts. By purchasing Sharp, Foxconn gained direct control of more of the iPhone’s components—and the priciest one to boot.

Purchasing Toshiba’s NAND flash division will further increase Foxconn’s direct control of how it charges Apple for the parts it procures to make each phone. Meanwhile, if Apple goes in with Foxconn on the deal, it can ensure that it gets the best-in-class NAND flash for itself, forcing its competitors to wait to buy up the rest.

Buy buying the unit, Apple and Foxconn would also be acquiring a solid business. Unlike Toshiba’s other divisions, its NAND flash division is relatively healthy. Sales have been steady over the past five years, and profits, while subject to boom-and-bust cycles typical of the memory industry, have been generally healthy despite a slump during the company’s fiscal year that ended in March 2016.

The sale could put as much as $28 billion in Toshiba’s coffers—money it desperately needs, after a poorly-timed foray into nuclear and an acquisition gone awry caused it to write-down $6.1 billion in assets, jeopardizing its future survival. But even if it saves Toshiba, it marks a minor…