An Iranian vessel had ignored repeated radio calls as it sped toward the US ship, prompting the American vessel to fire warning shots, Fox News reported.
"The Americans made a provocative and unprofessional move by issuing a warning and shooting flares at vessels", the statement said.
The American aircraft carrier and its accompanying warship left the area afterwards, it added.
An Iranian vessel steers close to the U.S. Navy coastal patrol craft USS Thunderbolt (R) in the Gulf in a still image from video provided by the U.S. Navy July 25, 2017.
US, Iranian navies encounter again in Persian Gulf
In remarks in June 2016, Leader of the Islamic Revolution Ayatollah Seyed Ali Khamenei underlined that security of the Persian Gulf region comes within the purview of the regional countries alone, and dismissed the U.S. claim of seeking security in the region.
The relations between the two countries have been strained since the arrival in power of president Donald Trump, which multiplies the declarations and the hostile actions against Tehran, including by imposing new sanctions against the country.
There have been a string of close encounters between United States ships and Iranian vessels in the Gulf in recent months.
On Friday, the United States, France, Germany and Britain - who brokered the 2015 nuclear deal with Iran along with China, Russia and the European Union - said they're raising concerns with the United Nations over Iran's Thursday launch of a satellite-carrying rocket into space.
On Saturday Iran's foreign ministry said the missile program is part of "domestic policy of the country, deterrent and at service of regional peace and security".