Pacific Sunwear of California Inc. in Anaheim filed for bankruptcy protection and said it will convert debt into equity for creditor Golden Gate Capital.

The San Francisco-based private equity firm will convert more than 65% of a $90 million term loan due in December into equity in the reorganized teen apparel and accessories retailer. The deal also calls for Golden Gate to provide another $20 million upon PacSun’s emergence from Chapter 11 to “support its long-term growth objectives.”

“The plan ... places PacSun in a very promising position as we continue the brand and merchandising transformation that our team has worked relentlessly to achieve,” President and Chief Executive Gary Schoenfeld said in a statement. “Great brand partnerships will remain paramount to PacSun’s success and the Plan provides for all key suppliers to be paid in full following the effective date of the Plan.”

Schoenfeld added the pending restructuring will help the company reduce “very high occupancy cost of approximately $140 million per year ... either through landlord negotiations or lease rejections, appropriately adjusting the fixed costs of operating our stores to better match the shifting retail landscape.”

PacSun also got $100 million in debtor-in-possession financing from Wells Fargo Bank, and will be able to “draw capital as needed to manage seasonal swings in cash flow.”

Wells Fargo also has committed to a five-year $100 million revolving line of credit effective upon the company’s emergence from Chapter 11.

PacSun, which operates 593 stores, filed its fourth-quarter and full-year financials.

Its revenue for the January quarter was $232.9 million, up 0.6% from $231.6 million it posted in the fourth quarter of fiscal 2014. The company’s same-store sales were flat.

PacSun narrowed its losses to $10 million or 14 cents per diluted share, compared to a net loss of $26 million, or 38 cents per diluted share for the year-ago quarter.

The retailer’s revenue for all of fiscal 2015 was $800.9 million, down 3% from $826.8 million it reported for fiscal 2014. Its same-store sales decreased 2.6%. PacSun’s loss for the year was $8.5 million, or 12 cents per diluted share, down from a net loss of $29.4 million, or 42 cents per diluted share it had in 2014.

Shares of the retailer had been dropping steadily in the days preceding the bankruptcy filing, and are now around 6 cents a share for a market value about $4 million.