Bed Bath & Beyond, the home goods retailer that has been struggling for years, announced on Friday that it will file for Chapter 11 bankruptcy protection and close all of its 1,500 stores in the U.S. and Canada by the end of May.

The company said in a statement that it has been unable to overcome the challenges posed by the COVID-19 pandemic, which has severely impacted its sales and cash flow. The company also cited increased competition from online retailers, changing consumer preferences, and rising costs as factors that contributed to its decision.

Bed Bath & Beyond said it has secured $250 million in debtor-in-possession financing from a group of lenders to support its operations during the bankruptcy process. The company said it intends to use the bankruptcy proceedings to restructure its debt, optimize its store footprint, and explore strategic alternatives, including a potential sale of some or all of its assets.

The company said it will begin store closing sales on April 26, and that customers can still shop online and use their gift cards until May 31. The company said it will honor all existing customer programs, including coupons and returns, until then.

Bed Bath & Beyond was founded in 1971 and grew to become one of the largest home goods retailers in the U.S., offering a wide range of products such as bedding, bath accessories, kitchenware, furniture, and decor. However, the company faced increasing pressure from online competitors such as Amazon and Wayfair, as well as discounters such as Walmart and Target. The company also suffered from a lack of innovation and differentiation, as well as a cluttered and confusing store layout.

The company had been trying to turn around its fortunes under a new leadership team that took over in late 2019. The company launched a new digital platform, revamped its merchandise assortment, improved its supply chain efficiency, and closed hundreds of underperforming stores. However, these efforts were not enough to save the company from the devastating effects of the pandemic, which forced it to temporarily close most of its stores in 2020 and 2021.

Bed Bath & Beyond is the latest casualty of the retail apocalypse that has claimed many other well-known brands in recent years, such as J.C. Penney, Sears, Toys R Us, Pier 1 Imports, and Neiman Marcus. Analysts expect more retailers to follow suit as the pandemic continues to disrupt consumer spending and behavior.