The planned closures, which need court approval, are expected to begin early next month and be mostly completed by the end of April, Toys “R” Us CEO Dave Brandon said in a message to customers posted on the company’s website.

“The actions we are taking are necessary to give us the best chance to emerge from our bankruptcy proceedings as a more viable and competitive company,” he said.

Several other stores will be converted into co-branded Toys “R” Us and Babies “R” Us outlets, Brandon added.

Melanie Teed-Murch, president of Toys “R” Us Canada, said in a statement that all 83 locations there would continue operating as usual.

The news comes after a brutal year for retailers in the U.S. in which store closings more than tripled from the previous year to nearly 7,000 closings, setting a record.There was also an increase in the number of store openings, as more successful retailers moved into vacated locations. But the year marked the first time since the Great Recession of 2009 that there was an absolute decrease in the number of U.S. stores, according to Fung Global Retail & Technology, a retail industry think tank.

Much of the problem in traditional brick-and-mortar stores was because of a shift by consumers to buying more goods online. Foot traffic in stores fell 8% last year, according to Fung.

But the problems at Toys “R” Us predate the growth of online shopping. It suffered from fierce competition and lost market share to fellow big box retailers like Walmart and Target. It has lost nearly $2.5 billion since its last reported an annual profit five years ago, which has left it reeling under $5 billion in debt.

Unlike other retailers that have been steadily closing unprofitable locations, Toys “R” Us continued to add stores right up until recently. It had 1,691 company owned stores as of a year ago, up from 1,622 a year earlier. Still the store closings announcement was not a surprise. CEO Dave Brandon said in December that the company was studying the question of whether to close stores. The bankruptcy process makes it less costly for retailers to break lease on unprofitable locations.

The company’s same-store sales fell 4.4% in the quarter ended October, with its U.S. stores experiencing a sharper drop of 7%. The toy industry at large is also facing headwinds, with key manufacturers like Lego and Mattel struggling with declining sales.