President Donald Trump has told the nation in a televised speech that the US military has nearly completed its goals in the Iran war.

He vowed to strike Iran 'extremely hard' over the next two to three weeks and finish the job 'very fast', without setting any timeline for ending the conflict.

In his primetime address, Trump called for countries that receive oil through the Strait of Hormuz to show 'courage' and seize the key waterway, which has been effectively closed by Iranian attacks since the conflict began.

The president is grappling with rocketing gas prices and sliding personal popularity ratings as the war continues into its fifth week and US midterm elections loom in November.

Wednesday night's speech did little immediately to reassure global oil markets that disruption to the Strait of Hormuz shipping route will ease anytime soon.

The price of benchmark Brent crude was trading at about $100 a barrel before the president started speaking. Afterwards it rose to $105.

In the 20-minute speech from the White House, Trump said the US was nearing completion of its core strategic objectives in the conflict and had decimated Iran's navy drone and ballistic missile forces.

Trump stated, Very shortly, we are going to hit them extremely hard over the next two to three weeks. However, he provided little insight into the state of what he described as 'ongoing' discussions with Iran's leadership, leaving open the possibility of hitting Iranian energy infrastructure if negotiations prove fruitless.

If there is no deal, we are going to hit each and every one of their electric generating plants very hard, and probably simultaneously, the US president said.

Earlier in the day, Trump posted on his Truth Social platform that Iran had asked for a ceasefire - a claim that Iran's foreign ministry quickly described as false and baseless.

In his speech on Wednesday night, as he has done several times in recent days, Trump called on US allies to do more to secure shipping lanes through the Strait of Hormuz.

He urged them to build up some delayed courage and said, Go to the Strait and just take it. His address to the nation came shortly after it emerged that Nato Secretary General Mark Rutte, who is known as the Trump whisperer because of his influence with the president, is planning to visit the White House next week.

The president's political opponents were quick to criticize his speech. New York Democrat and Senate Minority Leader Chuck Schumer described the address as 'rambling, disjointed and pathetic'.

Trump's actions in Iran have drawn widespread criticism, with an update by US Central Command reporting that American forces have struck more than 12,300 targets across Iran since Operation Epic Fury began, although Iranian attacks across the region have still continued.

A Reuters/Ipsos poll last week suggested that two-thirds of Americans believe the US should end the war quickly, even if it means not achieving Trump's goals.