A senior Iranian military commander on Sunday dismissed claims from Washington that US patrol ships have been harassed by Iranian boats in the Persian Gulf, saying Tehran acted according to international law.

"Iranian boats continue to act based on defined standards and are well aware of the international laws and regulations, so the claims are not only untrue, but stem from their fear of the power of Iran's soldiers," said Brigadier General Masoud Jazayeri, deputy chief of staff of Iran's armed forces, according to state news agency IRNA.

The Pentagon last week said seven Iranian Revolutionary Guard Corps fast-attack boats approached the USS Firebolt on September 4 with their machine guns uncovered, though not trained on the Americans.

It was at least the fifth incident revealed by the Pentagon in the past month, with US military officials repeatedly criticising the Iranian military for its behavior in the Gulf.

But Jazayeri said the claims were exaggerated.

"When Iranian boats pass by them at a distance of a few kilometres, Americans claim that Iranian boats have approached them within a range of one kilometre," he said.

"Iran's marine corps will never be stopped by the propaganda of extra-regional enemies and their vassals in the region in guarding the Islamic Republic of Iran's sea borders and economic interests," he added.

U.S. Navy officials say ships from the two countries interacted more than 300 times in 2015 and more than 250 times in the first half of this year, and claims 10 percent of those encounters were unsafe and unprofessional.