J.C. Penney on Friday reported a bigger-than-expected increase in quarterly same-store sales, as the department store chain's latest efforts to get rid of excess inventory and refresh its apparel business showed signs of progress.

The news came just weeks after Penney slashed its full-year profit and sales outlook, citing a hit due to heavy discounting. At the time, Penney also set the bar lower for third-quarter earnings.

The retailer's shares climbed more than 17 percent Friday morning after it beat Street expectations.

Here's what Penney reported, compared with what Wall Street was expecting, based on a Thomson Reuters survey of analysts:

A net loss of 33 cents a share, excluding items, compared with a forecast loss of 43 cents per share.

Revenue was $2.81 billion, versus an estimate of $2.77 billion.

Same-store sales climbed 1.7 percent, compared with an anticipated increase of 0.5 percent.

"During the third quarter, we took aggressive actions to clear slow-moving inventory, primarily allowing for an improved apparel assortment heading in to the Holiday season," Chief Executive Marvin Ellison said in a statement.

"While these actions had a negative short-term impact on profitability in the third quarter, we firmly believe it was the right decision for the Company as we transition into the fourth quarter and fiscal 2018."

Total net sales fell 1.8 percent, to $2.81 billion, in the fiscal third quarter, compared to $2.86 billion a year ago. The drop was attributed to Penney's latest store closures.

The department store chain's net loss widened to $128 million, or 41 cents per share, from $67 million, or 22 cents per share, one year earlier. Excluding one-time items, Penney lost 33 cents a share.

The reduction was driven by increased merchandising expenses, along with a charge related to Penney's pension plan, the company said.

Same-store sales — a metric monitored closely by Wall Street for retailers — climbed 1.7 percent, outpacing analysts' estimates. Penney said its home, Sephora, footwear and handbag divisions were some of the top performers during the quarter.

Within the home category, appliances have been a bright spot, Ellison said on a call Friday with analysts and investors. The CEO said Penney's appliance business more than doubled its sales during the third quarter when compared to a year ago.

Penney is trying to turn things around, but lately it has faced a few bumps in the road, which recently sent its share price to all-time lows.

"With Sephora in [around] 70% of the chain today (and growing) and an evolving apparel strategy that is moving away from its historical contemporary strategy, how can Penney's alter its brand perception so the changes resonate (and not alienate) its core shopper?" Gordon Haskett analyst Chuck Grom wrote in a note to clients.

"In our view, over-coming these challenges will be paramount as we move into 2018."

Just last week, the company announced plans to ditch the chief merchandising role entirely. Instead, Penney will use more "data analytics" to select the right products for shoppers.

For fiscal 2017, the retailer is calling for adjusted earnings of 2 to 8 cents per share, and full-year same-store sales are expected to be flat at best.

On Thursday, Macy's, Kohl's Nordstrom and Dillard's posted mixed third-quarter results, as the industry heads into a competitive — and telling — holiday season. American department stores are struggling to keep pace with e-retailers that are successfully drawing more customers their way.

"In an environment where consumers are increasingly turning to Ecom, and where department stores are selling 'other people's stuff' that can often be bought elsewhere, we believe the company needs to have far fewer locations," Citi analyst Paul Lejuez wrote about Penney in a note to clients last month.

Penney has already announced 140 store closures in 2017, but some analysts are saying it won't be enough.

"In the current retail environment, we believe department stores are structurally disadvantaged to win," Lejuez said. "Risks continue to mount."

Even with Friday's gains, Penney's shares have fallen more than 60 percent in 2017.

CORRECTION: This story has been updated to show J.C. Penney reported a quarterly loss of 33 cents a share.