Barnes & Noble Inc reported a narrower-than-expected quarterly loss and raised its full-year outlook on Thursday, boosted by cost-cutting and sales that fell less than planned in a weak book retail market.

Shoppers have been paring back on nonessential items, including books, in the recession, while online competition has also pressured sales at traditional bookstores.

Barnes & Noble has been no exception but has been focusing on cutting expenses, like store payrolls, and keeping inventory in check.

They've been managing their business really well, Morningstar analyst Joseph Beaulieu said, noting that gross profit margin was nearly flat despite lower sales, while expenses as a percentage of sales fell.

The largest U.S. book store operator said its net loss widened to $2.7 million, or 5 cents per share, in its first quarter, ended on May 2, from $2.2 million, or 4 cents per share, a year earlier.

Excluding the impact of discontinued operations, the loss was 4 cents per share, much smaller than the 15 cents analysts on average were expecting, according to Reuters Estimates.

Sales fell 4 percent to $1.11 billion but topped the average Wall Street forecast of $1.08 billion.

Sales at Barnes & Noble stores fell 3.5 percent to $989 million, with sales at stores open at least a year falling 5.7 percent. That was better than the company's forecast for a same-store sales decline of 6 percent to 9 percent.

Best-selling book titles during the quarter included Sandra Dallas' Prayers for Sale, Spencer Quinn's Dog on It, Steve Harvey's Act Like a Lady, Think Like a Man, and Malcolm Gladwell's Outliers.

Based on the first-quarter results, the company said it expected full-year profit of $1.10 to $1.40 per share, up from a prior forecast of 95 cents to $1.25.

Barnes & Noble said it expects second-quarter earnings of 5 cents to 15 cents per share on a same-store sales decline of 5 percent to 7 percent. Analysts were expecting a profit of 3 cents per share, according to Reuters Estimates.

Barnes & Noble shares rose 48 cents, or 2 percent, to $24.37 in midday trade on the New York Stock Exchange..

(Additional reporting by Reporting by Martinne Geller; Editing by Lisa Von Ahn and John Wallace)