J.C. Penney Co. filed for bankruptcy, punctuating decades of losses and failed revival efforts for the once mighty American shopping mall.

The filing of Chapter 11 allows the department store giant chain to stay in operation and to figure out a way of paying its debts.

Some of the stores in the chain will be completely closed, with locations to be made public in the coming weeks and the company could be put up for sale, J.C. Penney disclosed in a statement.

By the end of 2019, the company had 845 stores, according to CoStar Portfolio Strategy's real estate data base.

The declaration of bankruptcy comes as J.C. Penney, after many years of declining revenues and strategic missteps, had careened from one strategy of reinvention to another.

Nothing was apparently working. The company lost money in eight of the last nine years - a total of $4.45 billion, according to FactSet.

Having racked up the second-most debt of any struggling retailer at $4.2 billion - ranking only behind Neiman Marcus' luxury department store chain, according to Moody's Investor Service, J.C. Penney in recent weeks has engaged in talks with creditors hoping to bail it out.

A statement from the company said it has $500 million (£400 million) in cash and received $900 million in funding commitments from lenders.

In a statement, chief executive Jill Soltau said the coronavirus pandemic has created "unprecedented challenges for our families, our loved ones, our societies and our nation."

In 1902 James Cash Penney founded JC Penney in Wyoming. He believed prices would be low, set and labelled - a step away from the haggling that was prevalent at the time.

The retailer has proposed a restructuring plan that would shed billions of dollars in debt and enable it to emerge as a financially sustainable entity from bankruptcy. 

But U.S. Judge of Bankruptcy David Jones told J.C. Penney in a Saturday hearing, that he has "concerns" that JC Penney is not shifting "fast enough."

"I think there is a real hope that the restructuring efforts will continue, but it's kind of difficult when people are forbidden to enter your store and you can't turn the lights on," Jones said.

The company said it owed about $8 billion to more than 100,000 creditors and the turnaround plan seeks to cut the total by "several billion dollars." As a condition of the financing agreement, it will explore strategic alternatives, including a third-party asset sale.

The first female head of the Plano, Texas-headquartered business, Soltau joined in 2018 and embarked on an ambitious turnaround plan. The shutdown of the stores triggered by the pandemic has left Soltau unable to carry it out.