* Ex-FBI director has no doubt Russia meddled in U.S. election
* Exit polls show hung UK parliament likely
* Nvidia, Yahoo help boost Nasdaq to closing record high
* Indexes up: Dow 0.04 pct, S&P 500 0.03 pct, Nasdaq 0.39 pct
* Stock futures dip after UK vote (Updates with U.S. stocks futures dip after UK exit polls)
By Rodrigo Campos
NEW YORK, June 8 (Reuters) - The "Trump trade" made a comeback on Thursday on Wall Street but the S&P and Dow industrials ended flat as former FBI director James Comey said President Donald Trump fired him to undermine an investigation into Russian meddling into last November's U.S. election.
The Nasdaq Composite posted a record closing high boosted by gains in Nvidia and Yahoo. S&P 500 futures opened slightly lower for the overnight session after exit polls showed there was a likelihood for a hung British Parliament.
Traders had been on tenterhooks ahead of Comey's testimony to a Senate committee, his first since being fired by Trump on May 9. His prepared remarks had been made public Wednesday.
The market's concern on the issue is whether the Trump administration can put the investigation behind it and revive momentum for their agenda of lower taxes and looser regulations. Bets on that agenda are partly behind a rally that has taken stock indexes to record highs.
The Trump 'reflation trade' that favored banks and sectors linked to infrastructure spending, among others, was back Thursday, with the S&P 500 financial sector up 1.1 percent.
The S&P 1500 construction and engineering index rose 1.4 percent and a gauge of construction materials' stocks added 1.5 percent.
"If there was something (damning) that's going to come out, as leaky as things seem to be, we would have heard something more than what we've been hearing so far," said Scott Wren, senior global equity strategist at Wells Fargo Investment Institute in St. Louis, Missouri.
Also supporting infrastructure stocks, specifically steel companies, was an announcement from Commerce Secretary Wilbur Ross that a national security review of the U.S. steel industry will seek to protect the interests of both domestic steel producers and consumers.
The S&P 1500 steel sector index jumped 4.1 percent, the most since April 20.
In his statement, Comey said the president lied in describing their encounters and that he had no doubt that Russia interfered with the election, but was confident that no votes had been altered.
The Dow Jones Industrial Average rose 8.84 points, or 0.04 percent, to 21,182.53, the S&P 500 gained 0.65 points, or 0.03 percent, to 2,433.79 and the Nasdaq Composite added 24.38 points, or 0.39 percent, to 6,321.76.
Other analysts were not so rosy about the effect of Comey's testimony on the Trump agenda.
"It leaves us where we were before. It becomes that much more difficult for the Trump administration to put together a fiscal stimulus package," said John Canavan, market strategist at Stone & McCarthy Research Associates in Princeton, New Jersey.
"Anything they could put together with tax reform and infrastructure spending would be a lot smaller than had been expected. You are also pushing back the timing on any fiscal stimulus into 2018, possibly in 2019."
Utilities stocks fell the most on the S&P 500 as Treasury yields rose, tracking German Bund yields, after the European Central Bank upgraded its growth forecast for the euro zone even as it suggested its stimulus plan will remain in place as inflation remains subdued.
The S&P utilities sector was down 0.88 percent, the most since mid March.
Futures opened slightly lower after an exit poll unexpectedly showed Prime Minister Theresa May falling short of an overall parliamentary majority in Britain's election.
Pressure on U.S. stocks from the British vote was expected to be "fleeting," according to Brian Jacobsen, chief portfolio strategist at Wells Fargo Funds Management in Menomonee Falls, Wisconsin.
"A hung parliament isn’t a worst case scenario. In fact, it could be positive over the long-term as it means Brexit would have to take a softer-form. This seems to be a uniquely British problem."
S&P 500 e-minis were down 3.5 points, or 0.14 percent, with 14,354 contracts changing hands.
Among specific stocks, Nordstrom jumped 10.3 percent to $44.63 after the department store operator said that some members of the controlling Nordstrom family have formed a group to consider taking the company private.
Alibaba shares were up 13.3 percent to $142.34 after the company said it expects revenue growth of 45 to 49 percent in the 2018 fiscal year.
Yahoo, which has a 15.5 percent stake in Alibaba, gained 10.2 percent to $55.71.
Chipmaker Nvidia jumped 7.3 percent to $159.94 after Citigroup reiterated its bullish view on the stock and said longer term it could hit $300.
Advancing issues outnumbered declining ones on the NYSE by a 1.36-to-1 ratio; on Nasdaq, a 1.98-to-1 ratio favored advancers.
About 7.10 billion shares changed hands in U.S. exchanges, compared with the 6.62 billion daily average over the last 20 sessions. (Reporting by Rodrigo Campos; Additional reporting by Richard Leong and Caroline Valetkevitch; Editing by Chizu Nomiyama and James Dalgleish)