The bankrupt Wendy’s and Pizza Hut franchisee NPC International has agreed to sell its restaurants to Flynn Restaurant Group and Wendy’s International in separate deals.

According to the agreement, Flynn will take over more than 925 of NPC’s Pizza Hut restaurants, half of its Wendy’s restaurants, and all of its shared service assets.

Wendy’s will buy NPC’s remaining Wendy’s restaurants and assign the right to purchase restaurants to five existing Wendy’s franchisees.

The combined value of the two deals is approximately $801m.

Both Flynn and Wendy’s have agreed to retain NPC’s restaurant field operations employees and other non-field NPC employees.

NPC Wendy’s division CEO and president Carl Hauch said: “We are very pleased that our restaurants will be joining the ranks of established, high-performing restaurant franchise groups.

“We are grateful to Judge Isgur for his guidance during the mediation process and to Wendy’s, Flynn, Wendy’s franchisee acquirers, and our lenders for working diligently to allow for this result.”

The deals will enable NPC, which declared bankruptcy last July, to complete its chapter 11 restructuring.

Flynn Restaurant Group founder, chairman, and CEO Greg Flynn said: “The Pizza Hut and Wendy’s restaurants we have agreed to acquire from NPC align perfectly with this strategy, and we’re confident that our new team members will fit right in at Flynn Restaurant Group.”

In November last year, Flynn Restaurant Group made a stalking horse bid of $816m to purchase the assets of NPC.

However, Wendy’s objected to the sale to Flynn, citing that the bidder also runs some of its competitors’ restaurants.

Wendy’s submitted a consortium bid the same month, along with a group of pre-qualified franchisees, to take over approximately 400 of its restaurants operated by NPC across eight markets.

Pending court approval, the deal is expected to be completed in the second quarter of this year.