By Maria Armental 

Pacific Sunwear of California Inc. swung to a loss in the third quarter, dragged down by a large charge associated with a 2011 loan deal with Golden Gate Capital.

Excluding that charge, the company's results topped analysts' expectations, sending shares up 15%, to $1.96, in recent after-hours trading.

For the period ended Nov. 1, the company reported that sales at existing stores, a key metric that looks at sales across stores open for at least a year, rose 4%, the 11th consecutive quarter of growth, company officials said.

The company's results buck a recent trend of weak or declining sales at retailers, largely blamed on higher promotional events. Teen retailers in particular--Pacific Sunwear targets 17- to 24-year-olds--have been hardest hit by increasing competition from so-called fast-fashion peers, such as Hennes & Mauritz AB, better known as H&M, and Forever 21 Inc.

In 2011, the Anaheim, Calif., retailer turned to San Francisco private-equity firm Golden Gate Capital for help. The equity firm had helped other retailers, including Eddie Bauer Holdings Inc. and Express Inc.

Under the deal, Pacific Sunwear received a five-year $60 million secured-term loan to help buyout leases and close stores while Golden Gate Capital got two board seats and an option to buy 19.9% of Pacific Sunwear's shares at $1.75.

Pacific Sunwear ended the three-month period through Nov. 1 with 620 stores, down 15 stores from the year-ago period.

Overall, the company reported a loss of $469,000, or a penny a share, compared with a year-earlier profit of $17.2 million, or 24 cents a share. Excluding certain items, the loss from continuing operations was three cents a share, compared with five cents a share a year earlier.

Revenue rose to $212.3 million from $202.8 million a year earlier.

Analysts surveyed by Thomson Reuters had expected a loss of four cents a share on $208 million in sales.

For the current quarter, the company expects to lose 12 cents to 17 cents a share on sales between $218 million and $227 million, compared with the Wall Street consensus of a loss of 12 cents a share and sales of $221.7 million, according to Thomson Reuters.

Pacific Sunwear expects sales at existing stores to stay flat or increase up to 4%.

Through Wednesday's closing, the company's stock was down 49% for the year.

Write to Maria Armental at maria.armental@wsj.com

Access Investor Kit for Hennes & Mauritz AB

Visit http://www.companyspotlight.com/partner?cp_code=P479&isin=SE0000106270

Access Investor Kit for Express, Inc.

Visit http://www.companyspotlight.com/partner?cp_code=P479&isin=US30219E1038

Access Investor Kit for Pacific Sunwear of California, Inc.

Visit http://www.companyspotlight.com/partner?cp_code=P479&isin=US6948731004

Subscribe to WSJ: http://online.wsj.com?mod=djnwires