Barnes & Noble Inc, the world's largest book retailer, posted a 9 percent rise in quarterly profit on Thursday, helped by higher sales of Harry Potter and the Deathly Hallows, the final book in the popular series.

The company also forecast better-than-expected results in the current quarter and raised its full-year profit outlook.

Shares of Barnes & Noble, down 18 percent from their 52-week high in May, rose as much as 7 percent in morning trading.

Profit in the fiscal second quarter ended August 4 rose to $18.1 million, or 26 cents a share, from $16.6 million, or 24 cents, a year earlier.

Excluding one-time items, the company earned 12 cents per share, matching the high end of its profit forecast. Sales rose 7.6 percent to $1.2 billion. The results were in line with analysts' forecasts, according to Reuters Estimates.

Aside from Harry Potter, best-selling titles during the quarter included The Reagan Diaries, Al Gore's The Assault on Reason, and Conn and Hal Iggulden's The Dangerous Book for Boys.

But Harry Potter was the principal driver behind the retailer's sales growth, Chief Executive Steven Riggio said. The book continues to sell well, as do all the previous volumes in the Harry Potter series, he said.

Sales at stores open at least a rose 4.4 percent in the quarter. Excluding the spike in sales after the Harry Potter release, same-store sales rose just 1 percent.

Despite record demand for the final tome in author J.K. Rowling's series about a boy wizard, the Harry Potter book was a drag on margins due to heavy discounting.

Barnes & Noble, which sold the book at 40 percent off, said it drove down margins by about 0.3 percentage point.

PEERING AHEAD

With several headline titles in the pipeline, Riggio said the company figures to get a boost during the third quarter.

Former President Bill Clinton's Giving, Alan Greenspan's The Age of Turbulence, and Eric Clapton's The Autobiography are all coming to market during the quarter.

On balance, we think this year was a bit better in the publishing season than last year, but so much is dependent on the second half of the year, Riggio said on a conference call.

Barnes & Noble said it expects a third-quarter loss of 6 cents to 10 cents a share, with same-store sales ranging from flat to a low-single-digit increase. Analysts, on average, expect a loss of 14 cents a share, according to Reuters Estimates.

The company raised its full-year earnings forecast to a range of $1.69 and $1.87 a share, from a prior forecast of $1.49 to $1.67. Wall Street expects $1.81.

Barnes & Noble shares were up $1.01 to $35.91 in midday trading on the New York Stock Exchange after rising as high as $37.28 during the morning.