J.C. Penney Co. dressed middle-class American families for more than a century, but its failure to evolve as shopping habits changed in the past decade set the retailer on a long march toward bankruptcy.

On Friday, Penney filed for chapter 11 bankruptcy protection in Texas, becoming the biggest in a parade of retailers to seek a court restructuring during the coronavirus pandemic. Neiman Marcus Group Inc. , J.Crew Group Inc. and Stage Stores Inc. have all filed for bankruptcy this month.

The retail chain said it plans to use the bankruptcy process to close an undisclosed number of its roughly 850 department stores and put itself up for sale.

Store shutdowns since March have choked off Penney’s revenue, putting more pressure on the company’s lopsided balance sheet. After years of falling sales, red ink and failed turnaround efforts, the coronavirus pandemic hastened a reckoning with creditors.

The company JCP, +21.24% has been in discussions with some of its largest lenders, including Sixth Street Partners and the credit-investing arms of KKR & Co., Apollo Global Management Inc. and Ares Management Corp., as well as H/2 Capital Partners Inc., people familiar with the matter said.

Penney’s sales, which totaled $10.7 billion in the most recent fiscal year, have fallen each year since 2015, and it hasn’t made an annual profit in nearly a decade. The company skipped two interest payments in recent weeks, setting the clock on a bankruptcy filing.

The 118-year-old Penney is the latest American retailer to seek bankruptcy protection as the rise of fast-fashion, off-price chains like T.J. Maxx and e-commerce giants such as Amazon.com Inc. win over younger shoppers. Other chains like Gap Inc. and Nordstrom Inc. have recently raised billions in debt to ensure they have the cash to weather the crisis and reopen stores.

Department stores have been particularly hard hit by the changes. Stage Stores, which operates the Gordmans, Bealls and Goody’s chains in mostly rural towns, is liquidating hundreds of stores when they reopen this month and looking for a buyer. Both Macy’s Inc. and Nordstrom are closing some flagship stores.

Like its rival, Sears Holdings Corp., Penney for decades was a one-stop shop for millions of middle-class families, offering clothes, appliances, gardening equipment, portrait studios and beauty salons. At one point, it owned a bank and the Eckerd drugstore chain. It was a fixture in American shopping malls and at its peak in the 1970s operated more than 1,600 stores.

Penney listed assets of about $8.6 billion and debts of more than $8 billion in its chapter 11 petition filed in U.S. Bankruptcy Court in Corpus Christi.

Senior lenders have committed to supplying $900 million in financing to keep Penney afloat during the bankruptcy process. The company also said it has roughly $500 million in cash on hand.

Some 70% of Penney’s lenders have signed on to support a restructuring proposal that would reduce “several billion dollars in indebtedness,” the company said. Any chapter 11 plan would require court approval.

Founded in 1902 by James Cash Penney, the first store, in Kemmerer, Wyo., was called the Golden Rule and sold textiles and sundries. By 1913, with 36 locations, it changed its name to J.C. Penney. It went public in 1929 amid the stock market crash. It survived the Great Depression and after World War II opened hundreds of stores in newly built suburban malls.

In court papers, Penney listed its largest shareholder as BlackRock Inc. with a 13.85% stake.

Shares closed Friday at 24 cents.

An expanded version of this story appears on WSJ.com