Stocks rallied on Thursday, led by strong gains in tech and energy shares, as Wall Street cheered the possibility that the Federal Reserve will cut interest rates next month.

The S&P 500 surged 1% to 2,954.18, a record close. The broad index also hit an intraday record of 2,958.06. The Dow Jones Industrial Average closed 249.17 points higher at 26,753.17. The Nasdaq Composite gained 0.8% to end the day at 8,051.34.