Teen retailer Pacific Sunwear of California Inc. has filed a pre-packaged Chapter 11 petition for bankruptcy court protection.

The filing was done this morning in a Delaware bankruptcy court. The company filed what is known as a pre-pack because it contained an agreement for restructuring through which private equity firm Golden Gate Capital would take the company private. Golden Gate is the firm’s secured term loan holder.

PacSun and Golden Gate entered into a debt-for-equity agreement in which the term loan will be converted to equity in the reorganized firm. Golden Gate will also provide an additional $20 million in capital to shore up the retailer’s balance sheet upon exit from Chapter 11. PacSun also has secured a $100 million debtor-in-possession financing facility from Wells Fargo to allow it to operate while in bankruptcy proceedings. Wells Fargo will also provide PacSun with five-year $100 million revolving line of credit upon PacSun’s exit from Chapter 11.

Gary H. Schoenfeld, president and chief executive officer of the retailer, said of Golden Gate, “Their deep familiarity with our business, retail expertise, financial strength and industry experience make them an exceptional equity partner for us going forward.”

The ceo emphasized that the plan of reorganization “provides for all key suppliers to be paid in full following the effective date of the plan.”

He also noted that PacSun is the only one among it and its direct competitors  to “achieve compounded positive same-store-sales over the past four years,” adding that the restructuring will allow the firm to exit some store leases — the total occupancy cost is $140 million a year — and give it some breathing room from the nearly $90 million in long-term debt due later this year. The company operates 593 retail doors.

Josh Olshansky, managing director of Golden Gate, also noted the retailer’s positive comparable-store sales in 13 of the past 16 quarters, and said its confidence in the company is evidenced by its injection of $20 million into the reorganized firm.

The company said the net loss for the fourth quarter ended Jan. 30 was $10 million, or 14 cents a diluted share, on net sales of $232.9 million.

Even with the agreement in place there is no guarantee that Golden Gate will become PacSun’s new owner now that it is under bankruptcy court protection. PacSun will have to have an auction process to see if there are better offers for the bankrupt company.

In a court filing, Schoenfeld said that the company, founded in 1982 in Newport Beach, Calif. as a surf shop, saw its presence in the retail landscape explode throughout the Nineties. The company went public in 1993, and grew its store fleet to a peak of 965 stores in 2006. “The success of this brand positioning was, however, gradually eroded, due to industry-wide factors and a series of ill-conceived strategic and operating decisions.”

The ceo added that industry-wide factors — such as fast fashion — have created a more competitive and challenging market for retailers, and the shift in consumer behavior away from traditional mall shopping toward online-only stores has “negatively impacted sales in the company’s retail stores.” And while there’s also the issue of teens shifting a larger portion of its discretionary spending to dining and technology, Schoenfeld said that the “action sports segment of the retail industry, around which the company’s early success centered, is no longer as relevant as it had previously been.”

In the bankruptcy petition, the company listed total assets of $298.9 million, and total debts of $305.1 million.

The specialty chain’s bankruptcy follows the filings last year by Wet Seal, American Apparel and Quiksilver. It’s been a rough patch for the teen retailers, particularly as online brands such as Revolve and Nasty Gal have brought additional pressures to traditional, mall-based retailers.

“PacSun typically has been a bit more promotional in terms of its ability to drive traffic and get customers through the door,” said Dave King, senior research analyst at Roth Capital Partners LLC. He said it wasn’t unusual to see PacSun running buy-one-get-one and BOGO-type offers.

Pacific Sunwear also tried its hand at a number of tactics to improve the business over the past several years, including diversifying its brand mix in stores to lines outside the traditional action sports industry. On the women’s side, it pumped up its offering of more fashionable styles seen with the introduction of brands such as Kendall & Kylie and Brandy Melville. It also significantly reduced its store count.

Those are efforts that came a bit too late for the retailer, pointed out Brien Rowe, managing director of D.A. Davidson & Co.

“They just never recovered from the 2008-09 downturn. They tried. They had over 1,000 stores in 2006,” the investment banker said. “There’s also been this shift to a more streetwear-oriented focus and I think they were a little bit slow to changing their mix to reflect that. Fast fashion has also really hurt them.”