Major U.S. stock indexes experienced a decline and oil prices rose on Wednesday amid uncertainty following President Donald Trump's comments questioning a temporary truce in the conflict with Iran.

The S&P 500 index fell 0.3% on Wednesday, after an earlier drop of as much as 1.1%. The Dow Jones Industrial Average saw a more significant decrease, dropping 1.1%. The Nasdaq composite, however, managed to erase an early slump and finish with a gain of 0.2% after Trump clarified that recent skirmishes did not signal a return to full-scale war.

Brent crude oil prices climbed 5%, surpassing $78 per barrel.

On Wednesday, the S&P 500 closed down 21.14 points at 7,482.71. The Dow Jones Industrial Average lost 576.76 points, closing at 52,348.39. The Nasdaq composite finished up 51.96 points at 25,870.65. The Russell 2000 index of smaller companies fell 0.9%, or 26.10 points, to 2,956.39.

For the week leading up to Wednesday, the S&P 500 was down slightly, while the Dow Jones Industrial Average had fallen 1%. The Nasdaq showed a modest gain of 0.1%, and the Russell 2000 was down 1.3%.

Year-to-date performance showed the S&P 500 up 9.3%, the Dow up 8.9%, the Nasdaq up 11.3%, and the Russell 2000 up 19.1%.