The Pentagon has said a US Navy vessel fired three shots to warn an Iranian military boat off in the Gulf.
Spokesman Peter Cook said it was one of several incidents of Iranian vessels harassing US ships in the past week.
Mr Cook said the intention of the Iranian ships was unclear but their behaviour was unacceptable, as the boats were in international waters.
But Iran's Defence Minister, General Hosein Dehghan, said the US ships were in Iranian waters.
He said his forces would warn or confront any foreign ship that entered his country's waters.
American patrol ship the USS Squall fired three warning shots after an Iranian craft approached it head on, coming within 200 yards (180m) before turning away, the Pentagon says.
The shots, fired from a 50-calibre gun, caused the Iranian vessel to turn away, the spokesman added.
In a separate incident, video footage from on board the USS Nitze warship shows several small boats approaching the destroyer at high speed. Flares were fired after two of the boats ignored warnings to change course.
Some 40% of the world's seaborne oil exports pass through the Strait of Hormuz, at the entrance to the Gulf.
In January, Iran detained 10 US sailors at gunpoint after they ended up in Iranian waters. A naval inquiry later found that they had navigated incorrectly.
In the same month, Western powers lifted sanctions on Iran as it restricted its nuclear activities. The move heralded a change in relations between the US and Iran.