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.

The yield on the 10-year Treasury fell below 2% for the first time since November 2016. Investors cheered the decline in the benchmark for mortgage rates and corporate bonds.

The energy sector rose more than 2% to lead all 11 S&P 500 sectors higher as oil prices jumped. Tech gained 1.4% after shares of Oracle surged more than 8% on stronger-than-forecast earnings. General Electric's 2.8% rise pushed the industrials sector up more than 1.6% on the day.

"Markets are based on numbers and perception. If the perception is rates are getting cut, that's going to drive markets higher," said Kathy Entwistle, senior vice president of wealth management at UBS. "UBS' stance up until yesterday was we wouldn't see any rate cuts this year. Now we see a much larger chance of a 50-basis-point cut."

The Fed said Wednesday it stands ready to battle growing global and domestic economic risks as they took stock of intensifying trade tensions and growing concerns about inflation. Most Fed policymakers slashed their rate outlook for the rest of the calendar year by approximately half a percentage point in the previous session, while Chairman Jerome Powell said others agree the case for lower rates is building.

Policymakers also dropped "patient" from the Fed's statement and acknowledged that inflation is "running below" its 2% objective.

Market participants viewed the overall tone from the U.S. central bank as more dovish than expected. Traders are now pricing in a 100% chance of a rate cut next month, according to the CME FedWatch tool.