New York CNN  — 

Up to 300 Pizza Hut restaurants are slated to permanently close following the bankruptcy of one the chain’s largest franchisees.

NPC International, which filed for Chapter 11 in July, announced an agreement Monday with Pizza Hut’s owner Yum! Brands (YUM) to close roughly a quarter of its restaurants and sell the remaining locations. Specific restaurants and timing have not yet been determined, but NPC said a “substantial majority” of affected locations have dining rooms.

The agreement provides NPC with “flexibility to explore options for achieving a value maximizing outcome as it seeks to finalize the terms of a comprehensive financial restructuring and emerge from Chapter 11,” it said in a release. A perfect storm of coronavirus-related shutdowns, a massive debt burden of nearly $1 billion and rising labor and food costs tipped NPC into bankruptcy.

Pizza Hut said Monday that the 300 US locations “significantly underperform” compared with the rest of NPC’s Pizza Hut locations, and it will help employees find jobs at nearby Pizza Hut restaurants. The chain has been shifting away from opening and operating restaurants with dining rooms. Instead, it is encouraging customers to order pick-up through its website or third-party apps.

“We have continued to work with NPC and its lenders to optimize NPC’s Pizza Hut restaurant footprint and strengthen the portfolio for the future, and today’s joint agreement to close up to 300 NPC Pizza Hut restaurants is an important step toward a healthier business,” the pizza chain said in a statement.

NPC’s 1,227 Pizza Hut locations account for 20% of the chain’s 7,000 US locations. NPC’s remaining portfolio includes operating roughly 400 of Wendy’s 6,500 restaurants in the US.

Correction: A previous version of this story misstated how many Wendy's NPC International operates.