US Navy's Coast Guard vessels fired warning shots at Iran's Islamic Revolutionary Guard Corps Navy (IRGCN) boats in the Strait of Hormuz.
The US ships fired the shots at the IRGC boats after they closed in on the US vessels that were escorting guided missile submarine USS Georgia.
A Pentagon spokesman said the Iranian boats came in on the US ships at high speed and were just about 137 metres away from the US formation when the shots were fired.
"Earlier today a large group of IRGCN fast boats conducted unsafe and unprofessional maneuvers and failed to exercise due regard for the safety of US forces as required under international law," Pentagon spokesman John Kirby said.
There were 13 IRGCN fast attack boats in the formation. The Pentagon said the US Coast Guard cutter fired some 30 warning shots at the Iranian vessels after they failed to heed the warnings. The shots were fired from a .50 caliber machine gun.
In April a similar incident had occurred when a US Navy patrol ship had to open fire at IRGCN vessels that came "unnecessarily close" in international waters of the northern Persian Gulf.
Worsening Tensions
Iran's tensions with the US and its allies in the region have been increasing in the recent years, especially after the nuclear pact it entered into with the western powers broke down in 2018. The assassination of IRGC commander Qassem Soleimani and top nuclear scientist Mohsen Fakhrizadhe.
Last month, Israel said it attacked an Iranian ship which it says is a base for Iran's Islamic Revolutionary Guard Corps in the Red Sea waters.
The Iranian cargo vessel was damaged reportedly by a mine, between Yemen and Eritrea. In earlier reports, Saudi Arabia's state broadcaster Al-Hadath TV had raised the possibility that Israel might have been behind the attack.
In return Iran has been using its proxies in Syria and Iraq to attack key US installations in the region, including the Balad air base in Iraq. In early April, two rockets landed near the Iraqi military air base in Salahudin province north of capital Baghdad, which houses some US experts and advisers.