Iran's Revolutionary Guards said in a statement carried by local media on Saturday that the USS Nimitz, accompanied by another US warship and a helicopter, on Friday afternoon behaved in an "unprofessional and provocative" way while "being monitored by the Guards' frigates".
The statement said the unprovoked incident took place near Iran's Resalat oil and gas platform in the Gulf.
The Guards "ignored the unconventional move by the US ships and continued their mission, after which the supercarrier and its warship left the area," the statement added.
Later on Saturday, the US Navy said in a statement its ships were on a routine patrol when an American helicopter "observed several Islamic Revolutionary Guard Corps naval vessels approaching US naval forces at a high rate of speed".
"US naval forces attempted to establish communications, with no response from the Iranian vessels," it added. "Shortly thereafter, at a safe distance, the US helicopter deployed flares, after which the Iranian vessels halted their approach."
The incident came after a US Navy patrol boat fired warning shots on Tuesday near an Iranian vessel that American sailors said came dangerously close to them during a tense encounter.
"The Iranian vessel's actions were not in accordance with the internationally recognised 'rules of the road' nor internationally recognised maritime customs, creating a risk for collision," the US Navy said, referring to Tuesday's incident.
Such incidents between the Revolutionary Guards and the US Navy are frequent. The Pentagon reported 35 similar cases last year and 23 in 2015.
The Revolutionary Guard is a separate force from Iran's military and it answers only to the country's supreme leader, Ayatollah Ali Khamenei.
Iranian forces view the US presence in the Gulf as a provocation. They have accused the US Navy of unprofessional behaviour, especially in the Strait of Hormuz, the mouth of the Gulf through which a third of all oil trade passes by sea.
Tehran and Washington have had no diplomatic relations since 1979 when Iranian militant students stormed the US embassy and took 52 American hostages for 444 days.