Sears Holdings Corp posted a narrower-than-expected quarterly loss on Thursday, helped by the first increase in same-store sales at its Kmart unit in four years, and its shares rose 4 percent.

Sales at Kmart stores open at least a year - also known as same-store sales - rose 0.5 percent.

It was the first increase since 2005, and only the second since 2001, helped in part as the company took back its shoe operations this year from Footstar, which had operated within Kmart stores but used its own inventory and staff.

Kmart's performance was also helped by sales of toys, a category it recently reintroduced to 20 Sears stores as one of its many experiments to find growth under Chairman Edward Lampert.

Sears' net loss for the third quarter that ended October 31 narrowed to $127 million, or $1.09 a share, from $146 million, or $1.16 a share, a year earlier.

The company's adjusted loss per share was $1.04, as computed by Thomson Reuters I/B/E/S, compared with the average analyst loss estimate of $1.09.

Quarterly sales fell 4.7 percent to $10.2 billion.

Same-store sales at Sears, which depends more on the housing market due to its Craftsman tools and Kenmore appliances, fell 4.6 percent.

Even with the decline, the quarter represented Sears's best performance since the fourth quarter of 2007 and showed it had outperformed competing home improvement chains. Home Depot Inc's U.S. same store sales fell 7.1 percent during the quarter and Lowe's Cos Inc's fell 7.5 percent.

Together, holding company same-store sales fell 2.3 percent, helped in part by the closing of weaker locations. Despite the decline, it was the best quarterly figure for the company since 2005, the year the company was created in the Sears-Kmart merger.

Led by Lampert, a hedge fund manager, the company has been experimenting with ways to boost growth, using layaway plans and kicking off holiday season sales weeks early this year.

Lampert has also pushed management to clamp down on expenses and keep inventories lean, although cost cuts again failed to keep pace with declining revenues.

Sears lowered borrowing costs and increased the amount available under its revolving line of credit, a key source of funding as its builds inventory for the year-end shopping season. The company said it did so by issuing more commercial paper, a form of unsecured short-term finance usually reserved for companies with high credit ratings.

Shares of Sears have risen about 17 percent over the past three months. However, the stock is trading below where it was when the retailer announced a surprise loss in the previous quarter.

Shares rose to $78.90 premarket from its close of $75.77 on Wednesday.

(Editing by Derek Caney, Dave Zimmerman)