U.S. stocks closed higher Monday, with consumer discretionary and health care stocks among the top gainers, as oil prices pared most of their overnight losses.
"I think the market's up because of crude," said JJ Kinahan, chief strategist at TD Ameritrade.
All three major averages reversed an opening decline to hold higher, with the Dow Jones industrial average and S&P 500 near their highest levels of the year so far.
The Dow added about 100 points to briefly top the psychologically key 18,000 level for the first time in intraday trade since July 21, 2015. Walt Disney contributed the most to gains in the index, followed by Chevron and Home Depot.
"It's pretty amazing we're back to the levels we're at," Kinahan said. "The encouraging thing to me is we're getting strength from somewhere different every day."
U.S. crude oil futures settled down 58 cents, or 1.4 percent, at $39.78 a barrel, after falling more than 6.5 percent overnight after producers on Sunday failed to reach an output freeze agreement at a meeting in Doha, Qatar.
Traders noted some support for crude, at least in the short term, from news that Kuwait significantly cut production due to an oil-worker strike.
Energy recovered an initial 1 percent decline to briefly trade 1.5 percent higher as the top S&P 500 performer.
"I think a lot of people were short some energy names going into Doha and they're scrambling to cover," said Jeremy Klein, chief market strategist at FBN Securities.
Health care and consumer discretionary were also among the top S&P performers as most sectors advanced in afternoon trade.