NEW YORK (AP) — Beware the underdog.

J.C. Penney Co. delivered strong fourth-quarter results, wrapping up a year when it stole market share from rivals.

The company, based in Plano, Texas, offered an upbeat sales outlook, as efforts to spruce up its merchandise are winning over shoppers. It also pledged that it would return to a profit this year, on an adjusted basis. Investors cheered, pushing shares up nearly 15 percent Friday.

The results were a bright spot in an otherwise dismal holiday quarter, where department store rivals like Macy's and Kohl's offered disappointing outlooks after struggling with weak sales.

It was a reversal of fortunes this critical holiday season for Penney, which is clawing its way back from a failed reinvention plan that caused catastrophic losses and plunging sales.

And the latest performance offers encouraging news that a transformation by CEO Marvin Ellison is in the works. Ellison officially took the helm in August 2015, after a nine-month transition period working closely with Myron Ullman, who returned to the top CEO spot in April 2013 when the board fired Ron Johnson. Johnson got rid of most promotions and replaced them with everyday low prices and swapped basics for trendy assortments in a bid to grab higher-income, younger shoppers.

Ullman stabilized the business by bringing back discounts and restoring store-label merchandise. Ellison's goal is to expand sales and remake the retailer to be more nimble.

The company is playing catch up in e-commerce, including rolling out services that allow online shoppers to pick up orders in stores. It's using its store-label offerings as a key weapon to fight against pricing pressures from online rivals. It's also testing appliances and just rolled out a new campaign called "Get Your Penney's Worth," which will offer certain store-label items for pennies. Ellison noted that the Penney campaign should help to broaden its demographic, which centers on middle-income shoppers with an annual average household income of $60,000.

J.C. Penney still has a long way to go before it can claim a full recovery. The company posted annual sales of $12.6 billion for the year ended Jan. 30, up 3 percent from the prior year. Still, that's far below the nearly $18 billion in annual revenue once booked right before Johnson came to the helm in November 2011.

But Penney is making some good progress given a tough environment, particularly in department store arena, where shoppers are being selective.

Ellison told investors during a conference call Friday that it's evident that Penney gained market share in 2015.

"Our ability to gain share in a relatively flat to negative retail market is not accidental," he said. He also assured analysts that the company is testing different initiatives before rolling them out. Penney had learned painful lessons from Johnson who rolled out the bold pricing strategy without testing in the stores.

Ellison said the re-establishment of key private brands like St. John's Bay and Royal Velvet have helped win shoppers back. The company is also accelerating the rollout of shops within its stores devoted to the Sephora beauty brand. It added 28 last year for a total of more than 500 shops, a big chunk of the 800-store fleet. This year, it plans to add 60.

Sephora was a top-selling area for the holiday shopping season as well as handbags, home and furnishings and shoes.

Elllison noted all of its clothing businesses enjoyed positive results despite unseasonably warm weather that plagued many retailers including Macy's.

Penney posted a 4.1 percent increase in revenue at stores opened at least a year. In comparison, the metric rose just 0.4 percent at Kohl's, dropped 4.3 percent at Macy's and declined 3.2 percent at upscale Nordstrom.

Penney said it lost $131 million, or 43 cents per share, in the fourth quarter. That compares with a loss of $35 million, or 11 cents per share, a year earlier. Results were weighed down by pension and restructuring costs. Excluding those adjusted results amounted to a profit of 39 cents per share, which matched estimates from FactSet.

Revenue rose nearly 3 percent to $3.99 billion, and topped the $3.97 billion FactSet estimate.

Penney said that it expects revenue at stores opened at least a year to rise anywhere from 3 percent to 4 percent this year, and that adjusted profits should be positive.

Penney's shares rose $1.23 to close at $9.59. Still, the stock is well below the $43 it hit in February 2012 when enthusiasm for Johnson's makeover was high.

___

Follow Anne D'Innocenzio at http://www.Twitter.com/adinnocenzio