J.C. Penney (JCP) released quarterly results on Friday that reveal the department store swung into the black in the fourth quarter thanks to rising same-store sales, shrinking expenses and one-time items.

Shares of J.C. Penney soared 8% in extended trading as investors shrugged off a revenue miss from the department store, focusing instead on a positive tone from management on the company's ongoing turnaround efforts.

The company reported net income of $35 million, or 11 cents per share, compared with a loss of $552 million, or $2.51 a share, a year earlier.

Fourth-quarter results were boosted by a tax benefit of $270 million tied to gains resulting from the annual re-measurement of the pension plan.

Excluding one-time items, it lost 68 cents per share, besting forecasts from analysts for a loss of 85 cents a share.

Sales fell 2.6% to $3.78 billion, narrowly trailing the Street’s view of $3.85 billion. Same-store sales increased 2% during the fourth quarter, while holiday sales jumped 3.1% for the November/December period. Online sales soared 26.3% in the fourth quarter.

Gross margins expanded to 28.4% last quarter from 23.8% the year before. Selling, general and administrative expenses tumbled 17% year-over-year to $1 billion.

“We stabilized our business, both financially and operationally, and restored our process disciplines, promotions, inventory levels and focus on the customer,” CEO Myron Ullman III said in a statement.

J.C. Penney, which has been subject to cash concerns in recent quarters, said it ended the year with total available liquidity in excess of $2 billion.

Looking ahead, J.C. Penney projected same-store sales will rise 3% to 5% in the first quarter. Gross margins are expected to improve year-over-year, while expenses are seen declining slightly.

Ullman said the company’s turnaround “remains on course heading into 2014.”

For the full year, the department store expects same-store sales to increase mid-single digits and gross margins to improve “significantly.” Liquidity is expected to remain in excess of $2 billion at year-end.

"With the most challenging and expensive parts of the turnaround behind us, we will focus on improving gross margin, managing expense and steadily growing our sales in 2014,” Ullman said.

Shares of Plano, Texas-based J.C. Penney jumped 8.56% to $6.47 in extended trading, putting them on track to trim their 2014 tumble of 35%.

J.C. Penney also said in a filing that the Securities and Exchange Commission agreed to terminate an investigation into the company's liquidity, cash position and debt and equity financing. The agency wrote a letter earlier this month to J.C. Penney saying it concluded the probe and is not recommending SEC action. 

The department store previously disclosed the SEC investigation in early December. 

Follow Matt Egan on Twitter @MattMEgan5