Led by much stronger online revenue and demand for Nook products that outpaced physical book sales, Barnes & Noble (BKS) revealed on Tuesday better-than-expected third-quarter profit and improved sales.

However, its profit narrowed from the year-earlier as the company continued to lower prices for the Nook in an effort to better compete with Amazon’s (AMZN) Kindle.

The company introduced a new 8 gigabyte Nook tablet on Tuesday for $199 and lowered the price for the Nook Color to $169 from $199. The first version of the tablet cost $249.

“Our NOOK digital content business continues to grow rapidly, and according to some of the largest U.S. publishers, we maintained or slightly gained share in the eBook market during the third quarter,” Barnes & Noble CEO William Lynch said in a statement.

Revenue for the three months ended January 28 was up 5% to $2.44 billion from $2.32 billion a year ago, while comparable sales climbed 2.8%, including strong online sales growth of 42% and retail improvements of 2% to $1.46 billion.

Analysts in a Thomson Reuters poll were expecting slightly higher sales of $2.5 billion.

“In the third quarter, our traffic and sales in stores were the highest we’ve seen in five years,” Lynch said.

The New York-based bookseller earned $52 million, or 78 cents a share, compared with a year-earlier $60.5 million, or $1.01 a share. Excluding one-time items, the company earned 99 cents, beating the Street’s view of 92 cents.

While its college segment declined 3% to $525 million, the Nook business, including device hardware and accessories, grew 38% during the third quarter to $542 million. Digital content sales climbed 85%.

Barnes & Noble reiterated its earlier guidance announced on Jan. 5 and said it expects fiscal sales between $7 billion and $7.2 billion. Full year losses are expected to be in the range of $1.40 to $1.10 a share.  

Analysts are looking for a loss of $1.17 a share on sales of $7.2 billion.

Follow Jennifer Booton on Twitter at @Jbooton