(CNN) — Party City filed for bankruptcy protection Tuesday, weighed down by competition and years of financial losses.

The largest party goods and Halloween specialty retail chain in the United States said in a regulatory filing that it reached an agreement with debtholders to cut its $1.7 billion debt load.

The company said it secured $150 million in financing that will allow it keep its stores open and operations running. As of October, the Company had 761 total Party City stores and 149 temporary Halloween City stores. In 2021, Party City had more than 16,000 full- and part-time employees.

Party City has for years battled competition for party goods and decorations, especially from big-box chains and online retailers that sell a wider variety of merchandise.

Target in particular has increased its party supplies and special events merchandise, said Neil Saunders, an analyst at GlobalData Retail.

“This is squarely aimed at the family demographic which traditionally shopped Party City,” he said.

The emergence of Spirit Halloween, a pop-up store model, also cut into Party City’s sales during the key Halloween season.

Competition is not the only factor that led to Party City’s collapse, however.

The company had to contend with rising costs during the pandemic and a helium shortage, which hurt its highly-crucial balloon business. Balloons are a “focal point of our growth strategy and are a key driver of our differentiated brand experience,” the company said in a regulatory filing.

Between 2017 and 2021, Party City’s sales dropped 8% to $2.2 billion. The company projected sales to remain flat in 2022. The company also lost money every year between 2019 and 2021 and said was on track to lose up to $199 million in 2022.

Party City in December said it was at risk of a de-listing from the New York Stock Exchange because its stock fell under an average of $1 a share for 30 trading days.

Party City’s bankruptcy may be a sign of trouble for the retail industry this year.

Retailers had a weak holiday stretch, December retail sales showed, and that could force some companies to close stores or file for bankruptcy.

Other struggling chains are at heightened risk of bankruptcy as consumer spending softens.

Bed Bath & Beyond this month issued a grim message about its future, warning that a bankruptcy filing is a possible outcome for the company.

There is “substantial doubt about the company’s ability to continue” because of its worsening financial situation.

The-CNN-Wire™ & © 2024 Cable News Network, Inc., a Time Warner Company. All rights reserved.

Join our Newsletter for the latest news right to your inbox