Washington: Iran still poses as a threat and the United States is ready to counter it, the top US military officer said, referring to a tense encounter between Iranians and US Navy.

"There's no doubt in my mind that shots would have been fired, had the situation demanded it," Navy Admiral Mike Mullen said on Friday.

"The incident ought to remind us all just how real is the threat posed by Iran and just how ready we are to meet that threat if it comes to it," Mullen told reporters.

The United States said that five Iranian boats moved aggressively close to three US Navy ships in the Strait of Hormuz on Sunday and issued threats of a blast. Iran denied this.

"We will defend ourselves and our ships, and we will do so with deadly force if need be," Mullen said at the Pentagon.

The United States has formally complained about the incident, which Iranian officials dismissed as a normal incident where Iranian boats were trying to identify the US ships.