TOKYO (Reuters) - Toshiba Corp (>> Toshiba Corp) now favors a group led by Bain Capital LP and SK Hynix Inc (>> SK Hynix Inc) to buy its prized semiconductor business, as it failed to bridge key gaps with its business partner and rival bidder Western Digital Corp (>> Western Digital), two people briefed on the matter said on Tuesday.

The dramatic twist in the sale process, beset by legal wrangling and revised bids, comes just a day before Toshiba's latest deadline.

The Japanese conglomerate, which needs to sell the chip business to plug a huge hole in its finances, had been trying to seal a deal by Wednesday with the Western Digital group but now hopes to reach agreement with the Bain group by next week, said the sources, who declined to be identified as the talks were private.

A Toshiba spokesman said the firm could not comment on details of the talks. The parties have already missed two deadlines by Toshiba's banks, which want a deal to pump $18 billion or more into the company to pull it out of negative shareholder equity and prevent it from being delisted.

Yoshimitsu Kobayashi, an external Toshiba director, told reporters earlier on Tuesday that although the deadline is important, it is also important that negotiations head in a good direction.

A Western Digital spokeswoman also declined to comment. The Japanese unit of Bain Capital and SK Hynix could not be reached for comment outside business hours.

Toshiba is desperate to sell the unit to cover billions of dollars in liabilities from its bankrupt U.S. nuclear unit Westinghouse. The board had been seeking to decide on the preferred bidder on Wednesday, people involved in the talks previously told Reuters.

The 2 trillion yen ($18 billion) bid led by Western Digital Corp (>> Western Digital) and U.S. private equity fund KKR & Co (>> KKR & Co. L.P.) had been in the lead, sources had previously said.

But those talks hit snags as Toshiba, fearing that Western Digital was angling to eventually take over the chip business, sought to control the U.S. firm's stake in return for a better position in their current chipmaking joint venture, the sources said.

The offer by Bain and the Korean chipmaker is designed to get around that problem as it will invite two state-backed investors - the Innovation Network Corp of Japan (INCJ) and the Development Bank of Japan - to invest in the business only after any arbitration with Western Digital is settled, several sources have said.

The Bain-led group had been chosen preferred bidder in June. But those talks lapsed as Japan government investors who had been part of that consortium told Toshiba they were reluctant to close a deal in the face of the legal challenges posed by California-based Western Digital, which jointly invests in Toshiba's key NAND memory plant in central Japan.

On Friday, the Bain group raised its offer by nearly 500 billion yen to 2.4 trillion yen ($22 billion), including a 200 billion yen investment in infrastructure, sources have said.

Tuesday's reversion to the Bain group contradicts a report earlier in the day in the Nikkan Kogyo business daily that Toshiba had chosen the Western Digital bid and would announce the deal on Wednesday.

In addition to the Bain and Western Digital bids, Toshiba has said it was also considering a bid led by Taiwan's Hon Hai Precision Industry Co (>> Hon Hai Precision Industry Co., Ltd.), also known as Foxconn.

All three bidder groups have roped in major chip buyer Apple Inc (>> Apple) to bolster their offers, sources have said.

INCJ held its investment committee meeting on Tuesday without making any decision.

(Reporting by Taro Fuse; Additional reporting by Kentaro Hamada and Hyunjoo Jin; Writing by Makiko Yamazaki and William Mallard; Editing by Susan Thomas and Keith Weir)

By Taro Fuse