U.S. stock indexes snapped a multi-session streak of simultaneous records Thursday, weighed down by a decline in energy stocks, with the Dow industrials the only index to gain another record high at the close.

The Dow Jones Industrial Average DJIA, -0.46% finished up 7.91 points, or less than 0.1%, at a record 20,619.77, with gains from components like Cisco Systems Inc. CSCO, -0.12% and Coca-Cola Co. KO, -0.47% tempered by losses from ExxonMobil Corp. XOM, -0.02% and Chevron Corp. CVX, +0.29% , even as oil prices rose. The six-day streak of record closes for the blue-chip average is its longest since Dec. 13, 2016.

The S&P 500 index SPX, -0.84% finished down 2.03 points, or 0.1%, at 2,347.22, retreating from an intraday high set shortly after the market opened at 2,351.32. Energy and consumer-discretionary shares led decliners, while telecom and utilities shares attracted buyers.

Meanwhile, the Nasdaq Composite COMP, -1.26% closed down 4.54 points, or 0.1%, at 5,814.90, snapping a streak of seven straight closing records.

On Wednesday all three benchmarks closed at record highs for a fifth session in a row, something they hadn’t done since January 1992.

Stocks, which had earlier in the session switched between small gains and losses, started settling in negative territory during President Donald Trump’s news conference as he announced that a proposed replacement to the Affordable Care Act, also known as Obamacare, would come in March, before any proposals on tax reform.

The three benchmarks are up about 3% to 4% since the start of the month, helped by Trump’s promises of a “massive” tax plan. Also in focus were upbeat remarks on the U.S. economy from Federal Reserve Chairwoman Janet Yellen, who has also signaled a March interest-rate hike is possible, while noting that the economy is on a solid footing.

“We’ve had a big run in the near term, so some weakness is normal especially if you want the bull run to continue,” said Ryan Detrick, senior market strategist for LPL Financial, said in an interview. “You see these records and you almost don’t want to see them, you want more slow and steady.”

On the other hand, Detrick noted that the S&P 500 has gone 43 sessions without an intraday move of 1% or more, suggesting the market appears afraid to make a big leap, and increasing the chances that the extended period of low volatility we have enjoyed for a year cannot last too much longer.

Frank Cappelleri, executive director at Instinet, LLC, in research notes to clients indicated that a correction could be around the corner, citing high levels of optimism, which can be a contra-indicator.

“But it also may mean that the market’s long-term uptrend simply has reignited after a few years of violent back and forth price action,” Cappelleri said.

Other analysts warned that markets aren't taking the risk of higher rates seriously enough.

“This rally may come to a quick end if expectations for a March rate hike begin increasing,” warned ADS Securities researcher Konstantinos Anthis in a note Thursday.

The market sees a 22% chance of a rate rise in March, down from 31% on Wednesday, according to the CME Group’s FedWatch tool.

See:The stock market is doing so much winning that Wall Street is thinking Nasdaq 6,000

And read:The Nasdaq is partying like it’s 1999, by this metric

Other markets: European stocks SXXP, -0.07% finished lower, while Asian markets closed mixed. Oil futures US:CLH7 rose 0.5% to settle at $53.36 a barrel and gold futures US:GCH7 settled up 0.7% at $1,241.60 an ounce, as the ICE U.S. Dollar Index DXY, -0.14% pulled back.

Richard Thaler: Here's the best investing strategy

Individual movers: Networking-equipment giant Cisco Systems Inc. CSCO, -0.12% rose 2.4% after posting better-than-expected results late Wednesday.

Media heavyweightCBS Corp. US:CBS and packed-foods juggernautKraft Heinz Co. KHC, -2.29% also posted results late Wednesday, serving up earnings that topped forecasts, but investors weren't convinced. CBS shares finished up 0.3%, while Kraft shares dropped 4.2%.

Cable company Charter Communications Inc. CHTR, -1.54% reported fourth-quarter earnings that were better than Wall Street expected. Shares were down 0.2%.

Wendy’s Co. WEN, +0.66% shares dropped 4.5% after the firm reported declining earnings and sales in the fourth quarter as the company shed company-operated stores in favor of franchise-operated restaurants.

Dean Foods Co. US:DF slumped 8.1% after the food and milk-processing company missed fourth-quarter profit expectations and provided a downbeat outlook.

MGM Resorts International MGM, -2.13% shares fell 9.3% after the company reported earnings for the fourth quarter, in which profit missed expectations.

Stericycle Inc. SRCL, -0.38% shares rallied 7.7% after the medical waste disposal company’s quarterly results topped Wall Street estimates.

TripAdvisor Inc. TRIP, -1.00% shares dropped 11% after the travel website’s quarterly results fell short of analysts’s targets.

Economic news: Strong economic data on Thursday followed a trio of better-than-expected releases on Wednesday. Weekly jobless claims rose by 5,000 to 239,000, but they remained at exceedingly low levels that reflect the resilience of a nearly eight-year-old economic recovery.

In the housing market, construction on new houses fell 2.6% in January, but another increase in permits points to builders breaking ground on more units in the months ahead.

The Philadelphia Fed said its manufacturing index soared in February to a reading of 43.3 from 23.6 in January. That is the highest level since early 1984.

—Victor Reklaitis in London contributed to this article.