NEW YORK — A resurgent energy sector and another big acquisition by Warren Buffett propelled the stock market to its best day in three months on Monday.

Energy stocks jumped, following the price of oil higher. Crude rebounded after dropping to its lowest level of the year in early trading. Industrial stocks also climbed sharply after Buffett’s Berkshire Hathaway agreed to buy Precision Castparts, a maker of industrial components, for $32 billion.

The pace of corporate deal making has been surging this year as borrowing costs have stayed low, making it easier for companies to fund acquisitions. That tends to push up stock prices because buyers typically pay a premium to make the deal attractive to shareholders.

“Any time you have mergers and acquisitions, especially of this size, that’s a good sign because corporate America is feeling good about the economic prospects,” said Peter Cardillo, chief market economist at Rockwell Global Capital.

The Standard & Poor’s 500 index rose 26.61 points, or 1.3 percent, to 2,104.18. It was the biggest gain for the index since May 8.

The Dow Jones industrial average rose 241.79 points, or 1.4 percent, to 17,615.17. The Nasdaq composite climbed 58.25 points, or 1.2 percent, to 5,101.80.