A US navy destroyer has fired multiple warning shots at Iranian patrol boats near the entrance of the Gulf, according to US defence officials.

Iran's Islamic Revolutionary Guard Corps boats allegedly opened fire at the USS Mahan on Sunday, which was passing through the Strait of Hormuz, when they sped towards it.

The US officials said in a statement on Monday that the shots were fired as a result of failing to establish contact with the Iranians, and after a US navy helicopter released smoke flares as a cautionary move.

There were conflicting initial reports on whether the Americans and Iranians had established radio communication, as one US official said the main concern aboard the Mahan was the speed at which the Iranian boats were approaching, as opposed to their proximity.

READ MORE: Tehran warns US to stay out of Iranian waters in Gulf

The official said the boats were approximately more than 800 metres away when the warning shots were fired.

The Iranian boats reportedly retreated after the shots were heard, and proceeded to establish radio contact with the Mahan by asking its course and speed.

Iranian government officials have yet to comment on the US claims.

The US navy occasionally has confrontations with Iranian naval forces in the Gulf, but do not usually reach the point of prompting warning shots.

US-Iranian relations are among the tougher foreign-policy issues that Donald Trump, the US president-elect, will inherit next week when he succeeds President Barack Obama.

Trump pledged in September that any Iranian vessels that harass the US navy in the Gulf would be "shot out of the water".