Toys R Us has filed for bankruptcy protection in the US, undone by a hefty debt load and the rapid shift to online shopping.

The bankruptcy filing helps the Wayne New Jersey-based toy retailer relieve itself of the debt left over from its $6.6 billion acquisition by Kohlberg Kravis Roberts, Bain Capital Partners and real estate investment trust Vornado Realty Trust in a 2005 deal valued at $6.6 billion.

As part of the restructuring process, Toys ‘R’ Us plans to close some underperforming stores, according to people familiar with the matter.

The company expects most of its stores will be open for the holidays and it will use a large bankruptcy loan to continue buying merchandise and funding its operations, the people said.

The company does decide to file for Chapter 11, the reports seem mixed on when such a filing would happen.

The retailer has $4.9 billion in debt, $400 million of which has interest payments due in 2018 and $1.7 billion of which is due in 2019.

“Today marks the dawn of a new era at Toys”R”Us where we expect that the financial constraints that have held us back will be addressed in a lasting and effective way,” said Dave Brandon, the company’s chairman and CEO, said in a release announcing the filing.

Toys “R” Us, Inc. is an American toy and juvenile-products retailer founded in 1948 and headquartered in Wayne, New Jersey, in the New York City metropolitan area.