Major U.S. stock indexes rose to record highs on Monday, led by big gains in energy companies as the price of crude oil moved sharply higher, which is positive news for the long-struggling energy sector.

Investors also applauded several corporate deals, and technology companies posted solid gains.

The price of oil jumped 4 percent ahead of a meeting of OPEC countries. OPEC has agreed on the outlines of a deal to reduce production in an attempt to support flagging oil prices, which are still far lower than they were two years ago.

On Monday the Dow Jones industrial average, Standard & Poor’s 500, and Nasdaq composite all set records. So did the Russell 2000, an index of smaller companies, and the S&P’s small- and mid-size company indexes.

The last time all those indexes set records on the same day was Dec. 31, 1999, according to Ryan Detrick, senior market strategist for LPL Financial.

The Dow rose 88.76 points, or 0.5 percent, to 18,956.69. The S&P 500 climbed 16.28 points, or 0.7 percent, to 2,198.18. The Nasdaq composite jumped 47.35 points, or 0.9 percent, to 5,368.86.

advertisement | advertise on newsday

Benchmark U.S. crude oil gained $1.80, or 3.9 percent, to $47.49 a barrel.