U.S. stocks pared earlier losses but ended in negative territory, snapping a three-day win streak as oil futures pulled back from 10-month highs.

“A small consolidation after a big rally is not unusual, especially as investors are cautious ahead of the Federal Reserve meeting next week,” said Karyn Cavanaugh, senior market strategist at Voya Financial.

The S&P 500 SPX, -1.11% declined 3.64 points, or 0.2%, to close at 2,115.48, coming back from an 11-point deficit earlier in the session, with materials and financial stocks leading the losses. Seven out of the index’s 10 sectors finished lower, with consumer staples, telecoms and utilities showing slight gains.

The Dow Jones Industrial Average DJIA, -0.87% slipped 19.86 points, or 0.1%, to close at 17,985.19, after being down by as many as 89 points earlier in the session. Shares of American Express Co. AXP, -1.16% , Caterpillar Inc. CAT, -0.96% , and Goldman Sachs Group Inc. GS, +0.01% led blue chips lower.

The Nasdaq Composite Index COMP, -1.07% declined 16.03 points, or 0.3%, to finish at 4,958.62. Earlier, the index was down by 34 points.

Market reaction to initial jobless claims was muted as a weekly tally of those seeking first-time unemployment benefits pointed to low levels of layoffs even as other data showed hiring slowed in recent months.

“While the current environment can explain why stocks rallied—the oil prices are higher, the dollar is low and the Fed is likely to hold off rate hikes until later in the year, for stocks to surge, earnings need to catch up,” Cavanaugh said, adding that volatility is likely to continue into the summer.

The pullback comes after both the Dow and S&P 500 logged a third consecutive winning session on Wednesday, driven largely by a rally in oil futures to a nearly 11-month high. Crude initially continued the march higher on Thursday, but turned lower early in European trade. The U.S. crude benchmark CLN26, settled down 1.3% at $50.56 a barrel.

While the correlation between oil and stock prices is not as strong as it was earlier in the year, it is still in effect especially with the S&P 500 about 1% off its all-time high, said Randy Frederick, managing director of trading and derivatives at Schwab Center for Financial Research.

See:Can rallying oil avoid repeat of 2015 summer selloff?

“It’s not surprising that there’s a little bit of profit-taking,” Frederick said. With the recent dovish sentiment coming out of the Fed providing a lift to stocks this week and virtually no chance of a June rate increase next week, Fed Chairwoman Janet Yellen’s news conference could very well lift the S&P 500 back to a new all-time high, as well as a new resistance level, he said.

Economic news:Initial U.S. jobless claims fell to 264,000 in early June, marking the lowest level of new claims in six weeks. The data suggest layoffs remain low despite signs of a slowdown in hiring.

See:U.S. workers are less in danger of being laid off than any time in modern history

The dollar has been under pressure on fading expectations of a near-term rate increase, but took a breather from the selloff on Thursday, with the ICE dollar index DXY, +0.03% up 0.5% to 94.06.

Moves in stocks came as the yield on benchmark 10-year Treasurys TMUBMUSD10Y, 0.701% touched their lowest level in four months, at 1.66%.

Movers and shakers:Health Insurance Innovations Inc. US:HIIQ dropped 26% after a Raymond James downgrade Thursday. The company’s stock has dropped nearly 31% this week after the Department of Health and Human Services announced Wednesday morning a proposal to cut down on short-term health insurance plans.

Shares of J.M. Smucker Co. SJM, -0.53% rallied 7.9% after the company’s earnings forecast exceeded expectations.

Boston Scientific Corp. BSX, -3.00% is restructuring to save the medical-device maker up to $150 million a year by 2020. Shares rose 2.2%.

Shares of Restoration Hardware Holdings Inc. RH, -0.29% slumped 21% after the retailer late Wednesday swung to a first-quarter loss and lowered its outlook for 2016, casting doubts about the luxury-goods market and citing potential product delays, among other issues.

Shanghai Disneyland: Disney’s magic and China’s numbers

Tempur Sealy International Inc. TPX, -3.54% declined 2.8% after the company said its board agreed to increase the company’s share buyback program by $200 million.

Solar City Corp. shares SCTY, +7.36% slipped 1.8% even after RW Baird raised its rating on the solar power company to outperform from neutral.

Energy companies were hit, tracking the drop in oil prices. Shares of NRG Energy Inc., NRG, -1.99% slumped 6.6%, prompting UBS analysts to downgrade the stock to sell from buy. ChesapeakeEnergy Corp. US:CHK declined 1.8%.

Other markets: Asian stock markets ADOW, +0.33% closed broadly lower, as traders there fretted over the pace of the U.S. economic recovery and the Brexit referendum in the U.K. Markets were closed in Shanghai and Hong Kong for the Dragon Boat festival.

Stocks in Europe SXXP, -0.66% were also falling, with energy shares pressured by the drop in oil prices.

Meanwhile, gold US:GCQ6 futures climbed to their highest levels since mid-May, settling up 0.8% at $1,272.70 an ounce.

—Sara Sjolin in London contributed to this report.