S&P ends near flat; China rate cut offset by Bernanke NEW YORK (Reuters) - The S&P 500 ended barely changed on Thursday as optimism about China's interest-rate cut was offset by Federal Reserve Chairman Ben Bernanke's comments that dimmed hopes for more U.S. stimulus. Both the Dow industrials and the Nasdaq ended off session highs, with the Dow rising modestly for the day and the Nasdaq slipping. Stocks lost ground following Bernanke's comments a day after experiencing the best one-day rally so far this year. Over the previous three days, the S&P 500 gained 2.9 percent, recovering some of May's losses. The surprising move by China's central bank to cut its benchmark interest rate by 25 basis points helped ease worries about faltering global demand. Speculation has been rising that central banks will take more action to combat escalating debt problems in Europe and slower global growth. Bernanke, in testimony Thursday, said the Fed was ready to take action but gave no hint of imminent steps. His remarks were seen as offsetting more supportive comments from other Fed members in the last 24 hours, but still leaving the door open for more action at the Fed's next meeting on June 19-20. Bernanke threw traders a curveball. After his vice chair made it seem like QE was a foregone conclusion, he really messed people up. We tried to shake that off, but there was a lack of follow-through and we lost momentum," said Phil Flynn, senior market analyst with PFG Best in Chicago. The rate cut in China, the world's No. 2 economy, helped lift the stocks of U.S. companies linked to China's commodity-hungry industrial complex. An S&P index of industrial shares .GSPI gained 0.6 percent and an S&P materials index .GSPM rose 0.2 percent. U.S. stocks jumped more than 2 percent on Wednesday, a third day of gains for the S&P 500. The index has rebounded since hitting its 200-day moving average, a key technical support level, last Friday. The S&P 500 is still well off its highs for the year. While Europe was still very much in the spotlight, stocks showed little reaction to a downgrade by Fitch in Spain's credit rating to 'BBB' with a negative outlook, just two notches away from junk status. Among the day's decliners, shares of Navistar International Corp (NAV.N) dropped 14.3 percent to $24.11 after it posted a second-quarter loss, due to a big charge for warranty costs to repair engines built in 2010 and 2011. The truck maker also cut its full-year earnings outlook. Health insurer Molina Healthcare Inc (MOH.N) recalled its 2012 earnings guidance, citing uncertainties regarding medical costs in Texas, pushing its stock down 31 percent to $17.77. On the Nasdaq, shares of Nvidia (NVDA.O) fell 4 percent to $11.89 after FBR cut its price target on the company. Volume was above average. About 7.16 billion shares changed hands on the New York Stock Exchange, the Nasdaq and Amex, compared with the year-to-date daily average of 6.85 billion shares. Decliners beat advancers on the NYSE by about 16 to 14. On the Nasdaq, about three stocks fell for every two that rose. Additional reporting By Ryan Vlastelica; Editing by Dave Zimmerman and Jan Paschal