WASHINGTON: President Donald Trump on Thursday ruled out attacking Iran before the US midterm elections on Nov 3, saying Washington was holding "productive discussions" with Teheran.

Trump's post on his Truth Social platform followed a surge in oil prices on Thursday driven by media reports suggesting potential new US strikes before the elections.

"I want to make it clear to everybody that, while Iran is in very bad condition, both Economically and Militarily, and while the Blockade will remain in full force and effect...we will not be attacking Iran at any time prior to the Midterm Elections," he wrote.

"We are having productive discussions with the Islamic Republic of Iran," he added, without providing additional details.