The incident occurred in the Strait of Hormuz.
A US Coast Guard ship fired about 30 warning shots after a large group of Islamic Revolutionary Guard Corps speedboats approached US Navy ships in the Strait of Hormuz.
This was reported by the Pentagon.
Pentagon spokesman John Kirby said the Coast Guard ship Maui fired two bursts of 50-caliber machine gun fire as 13 IRGC speedboats approached six American ships, including the submarine Georgia.
Maui fired the first burst when the Iranian boats came within about 280 meters, and the second burst when they came within about 140 meters.
According to Kirby, after the second stage, the IRGC ships left.
The incident comes days after the US intercepted thousands of weapons from Iran in the northern Arabian Sea that were being sent to Houthi rebels in Yemen.