A US Navy vessel fired a warning flare towards an Iranian military speedboat that approached it in the Strait of Hormuz, the US Fifth Fleet said.
The incident Monday involving the patrol ship USS Sirocco comes amid tensions as Western powers and the Islamic republic seek to salvage their tattered 2015 nuclear deal.
"Three vessels from Iran's Islamic Revolutionary Guard Corps Navy interacted in an unsafe and unprofessional manner as US Navy ships transited the Strait of Hormuz," said the US Navy statement.
"One of the vessels approached Sirocco head-on at a dangerously high speed and only altered course after the US patrol coastal ship issued audible warning signals to avoid collision.
"The Iranian vessel also came within 50 yards (45 metres) of the US Navy ship during the interaction, and Sirocco responded by deploying a warning flare."
Washington has repeatedly accused Iran's Islamic Revolutionary Guard Corps of disrupting maritime traffic in the strategic Strait of Hormuz, a chokepoint through which a fifth of world oil output passes.
The latest incident comes after Iran's Guards on May 27 boarded and seized two Greek-flagged oil tankers in the Gulf. Iran's supreme leader, Ali Khamenei, has called it retaliation after Greece in a seizure "stole" Iranian oil.
The US Navy said Monday's incident "lasted one hour and ended when the IRGCN craft departed the area".