A stock trader at the New York Stock Exchange watches...

A stock trader at the New York Stock Exchange watches former FBI Director James Comey on a television monitor, Thursday, June 8, 2017, as Comey testifies before a congressional committee in Washington.  Credit: AP / Mark Lennihan

Wall Street turned in an uneven finish Friday as investors unloaded their technology company shares in favor of energy and financial stocks.

The tech-heavy Nasdaq composite, which has outpaced gains by other U.S. stock indexes this year, fell the most. The sell-off centered on the biggest companies in the stock market: Apple, Microsoft, Alphabet and Facebook.

The Standard & Poor’s 500 index closed slightly lower.

Even with the sell-off in technology stocks, the Dow Jones industrial average and the Russell 2000 index of small-company stocks closed higher, each setting new highs.

“We’re seeing investors rotate out of the international stocks and into the U.S. stocks in general,” said Sam Stovall, chief investment strategist at CFRA Equity Research. “And also a rotation out of technology and into energy, materials and financials.”

All told, the S&P 500 index fell 0.1 percent, to 2,431.77. The Dow gained 89.44 points, or 0.4 percent, to 21,271.97. The Nasdaq declined 113.85 points, or 1.8 percent, to 6,207.92. The Russell 2000 picked up 6.09 points, or 0.4 percent, to 1,421.71.

Despite the day’s big tech stock slide, more stocks rose than declined on the New York Stock Exchange.

U.S. stocks were coming off a two-day winning streak, which included a record high for the Nasdaq on Thursday.

Driver, 19, killed in Bay shore crash ... SCPD to hold vehicle auction ... FeedMe: Viral chip bag sandwich Credit: Newsday

$2.9M settlement over fatal LIRR crash ... Driver, 19, killed in SUV crash ... Protecting the LI Sound ... Billy Joel's agent joining hall of fame

Driver, 19, killed in Bay shore crash ... SCPD to hold vehicle auction ... FeedMe: Viral chip bag sandwich Credit: Newsday

$2.9M settlement over fatal LIRR crash ... Driver, 19, killed in SUV crash ... Protecting the LI Sound ... Billy Joel's agent joining hall of fame

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME