Sports Authority finally gave in on Wednesday to the enormous debt load that impeded its ability to keep pace with rivals like Dick’s Sporting Goods dks in riding the big fitness boom of the last decade.

The retailer filed for Chapter 11 protection in federal bankruptcy court in Delaware in a move aimed at helping it shed much of its debt and clean up its balance sheet. Sports Authority, which will close about 140 of its 463 stores, had been saddled with debt ever since a $1.3 billion leveraged buyout a decade a ago.

Back then, Dick’s and Sports Authority were about even in size, with annual sales of about $3 billion. But in the years since, Dick’s has pulled way ahead, thanks to better in-store presentation and tech in stores. Even though Dick’s same-store sales growth slowed in the first nine months of 2015, revenues by that metric are likely to clock in their sixth straight year of growth. (Wall Street analysts expect total 2015 sales of $7.3 billion, compared to almost $3 billion at Sports Authority.)

Sports Authority, owned by private equity group Leonard Green & Partners, was also hurt by big encroachments on its turf by traditional retailers, from Target tgt and Kohl’s kss to Gap Inc’s gps Athleta and even Walmart wmt offering more athletic wear. amzn and Walmart have eaten into its equipment sales. With such an abundance of places to buy gear and clothing, and a nimble rival in Dick’s, customers stayed away in droves.

The bankruptcy filing was largely expected since it missed a $20 million coupon payment on its debt in Jan. 15, triggering a 30-day grace period to work out a deal with creditors.

“We are taking this action so that we can continue to adapt our business to meet the changing dynamics in the retail industry,” said Michael E. Foss, chief executive officer of Sports Authority, in a statement. “We intend to use the Chapter 11 process to streamline and strengthen our business both operationally and financially.”

But in many ways, this Chapter 11 filing could be a blessing for many if a leaner Sports Authority proves able to take advantage of this second chance.

  1. Dick’s Sporting Goods: with Sports Authority closing 140 stores, Dick’s will have more markets to itself. Comparable sales at Dick’s were up only 0.9% in the first three quarters of 2015, so less competition would give it some breathing room. What’s more, this could give Dick’s, which operates 744 stores, a way to open new locations in underserved markets. (Dick’s has reportedly been interested in buying some stores in bankruptcy court.)
  2. Sports Authority: a clean balance sheet would let the retailer make much needed investments in its stores and make them attractive, with in-store boutiques. Dick’s has benefited enormously from shop-in-shops for fast growing brands like Under Armour ua and Nike nke Bloomberg reported that such installations have helped Dick’s generate $10 million a year in sales from the average store compared to $5.75 million for Sports Authority, citing Steven Ruggiero, a credit analyst at RW Pressprich & Co.
  3. Nike and Under Armour: if Sports Authority pulls through this, it would give those two fast growing brands better presentation in its stores and more high quality outlets. It would also diversify their wholesale distribution channel.

Sports Authority has lined up $595 million in debtor-in-possession financing (a fancy term for a bankruptcy loan) that should help it pay the $47.9 million it owes Nike, $23.2 million it owes Asics and $23.2 million it owns Under Armour to keep business relations harmonious.

Without the huge debt load estimated in some reports to be $643 million on its back, Sports Authority gets to show whether it knows how to be a retailer after all.