Toys R Us Inc. filed for Chapter 11 bankruptcy protection Monday night.

In a statement, the retailer said it intends to use bankruptcy proceedings “to restructure its outstanding debt and establish a sustainable capital structure that will enable it to invest in long-term growth.”

The retailer has been hurt by shrinking sales and increased online competition, and has still not recovered from a massive debt load from a leveraged buyout more than a decade ago.

“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 Chairman and Echief Executive Dave Brandon, in a statement. “Together with our investors, our objective is to work with our debtholders and other creditors to restructure the $5 billion of long-term debt on our balance sheet. ... We are confident that these are the right steps to ensure that the iconic Toys”R”Us and Babies”R”Us brands live on for many generations.”

The legendary toy retailer said it has already received a commitment for $3 billion in debtor-in-possession financing, part of which is from a bank syndicate led by J.P. Morgan Chase & Co. JPM, -0.21% . While that financing needs court approval, the company was confident it would be granted.

The bankruptcy filing had been expected, and the retailer tried to settle fears that it would be cut off from its holiday inventory. “Toys ‘R’ Us is committed to working with its vendors to help ensure that inventory levels are maintained and products continue to be delivered in a timely fashion,” the company said.

The news shook shares of toy retailers after-hours. Late Monday, Mattel Inc. MAT, -1.68% was down 6.2% and Hasbro Inc. HAS, -0.62% was down 1.7% after the announcement.

Toys “R” Us has about 1,600 stores worldwide, and the company said business would proceed as usual for its customers, and loyalty programs would continue to be honored. The company said its 255 stores outside the U.S. and Canada are not affected by the filing.