(Reuters) - Nvidia Corp NVDA.O shares fell as much as 5 percent in after-hours trading on Thursday after the chip maker said cryptocurrency-fueled demand had dried up and it forecast sales below Wall Street targets, overshadowing quarterly results that otherwise beat expectations.

The company’s bleak outlook for cryptocurrency chips was a sharp reversal from the prior fiscal quarter, when sales to so-called miners of digital currencies such as bitcoin and ethereum amounted to $289 million, nearly a 10th of Nvidia’s revenue. Nvidia previously had forecast sales for cryptocurrency chips for the fiscal second quarter ended July 29 of about $100 million. On Thursday it reported actual revenue of only $18 million.

“We benefited in the last several quarters from an unusual lift from crypto,” CEO Jensen Huang said on a conference call with analysts, “but at this time, we consider it to be immaterial for the second half” of the fiscal year.

It projected third-quarter revenue of $3.25 billion, plus or minus 2 percent, falling short of analyst estimates of $3.34 billion, according to Thomson Reuters I/B/E/S.

Ahead of a conference call with analysts, shares were down 3.6 percent to $248, still quadruple their value two years ago. Shares of Nvidia's chief rival in the graphics chip market, Advanced Micro Devices Inc AMD.O, have also been whipsawed by swings in the cryptocurrency markets.

Analysts were troubled by Nvidia’s gross margin forecast of 62.8 percent, slightly below expectations of 62.9 percent and possibly a result of putting more memory modules on its chips.

Analyst KinNgai Chan of Summit Insights Group said Nvidia shares were likely to trade lower as analysts reset their expectations around slower growth rates.

The cryptocurrency news and the lower-than-expected forecast clouded an otherwise strong quarter, including Nvidia's sales of chips to data centers, where companies such as Amazon.com's AMZN.O Amazon Web Services, Microsoft Corp's MSFT.O Azure as well as Alphabet Inc's GOOGL.O Google Cloud are buying up the chip to power artificial intelligence and other functions.

Nvidia’s largest and oldest business of selling graphical processing units, or GPUs, for video game players beat analyst estimates, bringing in $1.8 billion compared with estimates of $1.75 billion, according to data from FactSet.

Analysts had braced for lower gaming chip sales because Nvidia is widely expected to unveil a new generation of gaming chips ahead of the holiday shopping seasons, possibly as soon as next week. Gamers typically hold off on purchasing chips when new models are just around the corner.

Revenue from the company’s closely watched data center chips business rose 83 percent to $760 million, topping analysts’ estimate of $743.6 million, according to FactSet.

Rivals Intel Corp INTC.O and AMD have also been buoyed by the surge in demand from data centers, a rapidly expanding market powered by the explosive growth in mobile and Web apps.

Net income rose 89 percent to $1.1 billion for the fiscal second-quarter. Excluding items, Nvidia earned $1.94 per share. Total revenue rose 40 percent to $3.12 billion.

Analysts on average had expected a profit of $1.66 per share and revenue of $3.10 billion, according to Thomson Reuters I/B/E/S.