Krystal, the fast-food chain known for its tiny, square hamburgers, will exit bankruptcy after it agreed to sell itself to a New York private equity fund.

Dunwoody-based Krystal will keep most of its 300 locations open nationwide, although its new owner may choose to close some properties, according to court documents. Krystal, founded in Chattanooga, Tenn., in 1932, has 42 locations in metro Atlanta.

Fortress Investment Group in New York will acquire Krystal for $49 million, including the cancellation of some debt, according to court documents. A bankruptcy judge approved the sale on Wednesday.

As part of its agreement, Fortress will retain Krystal’s employees at their current pay levels. Krystal also will pay about $1 million to NCR to settle outstanding debts to the Atlanta-based maker of card-payment terminals. NCR was one of Krystal’s largest creditors.

A Krystal spokeswoman and a Fortress executive both declined to comment.

Krystal ran into trouble shortly after it began a revitalization effort in 2018, which was intended to address declining sales. It rebuilt stores and offered new promotions, but still struggled and was forced to cut costs.

Krystal’s problems predated the coronavirus pandemic, as it filed for bankruptcy before COVID-19 forced restaurants to close. Krystal closed all its dining rooms and kept open drive-through lanes and delivery service.

Fortress, Krystal’s new owner, has experience in the restaurant industry, having owned or managed Quizno’s sandwich shop, TGI Friday’s and others.