A US navy ship fired warning shots near an Iranian vessel which came within 137 metres in the Gulf on Tuesday, US officials said.

In a statement, US Naval Forces Central Command said the patrol craft, named Thunderbolt, fired the warning shots in front of the Iranian vessel after it ignored radio calls, flares and the ship's whistle.

The Iranian vessel was from Iran's Islamic Revolutionary Guard Corps (IRGC), the statement said, adding that it stopped its unsafe approach after the warning shots were fired.

A US official, speaking on the condition of anonymity, said the Iranian boat was armed but that the weapons were unmanned.

OPINION: Trump and Iran: Scenarios of escalation

IRGC later blamed the American ship for provoking the incident.

The IRGC navy issued a statement on Tuesday noting that an American "battleship" moved towards one of its patrol boats in international waters in the northern Gulf and fired two shots in the air, according to Sepah News, the official news site of the IRGC.

"The Revolutionary Guards navy boat, without paying attention to this unprofessional and provocative behaviour, continued its mission and after a short period of time the American ship left the area," the statement said, according to Sepah News.

READ MORE: Is Trump leading the US on the warpath with Iran?

Tuesday's encounter involving the USS Thunderbolt, a Cyclone-class patrol ship based in Bahrain as part of the US Navy's 5th Fleet, is the latest confrontation between Iranian vessels and American warships

The last major incident was earlier in January when a US Navy destroyer fired three warning shots at four Iranian fast-attack vessels near the Strait of Hormuz after they closed in at high speed and disregarded repeated requests to slow down.

Years of mutual animosity had eased when the United States lifted sanctions on Iran last year as part of a deal to curb Iran's nuclear ambitions. But serious differences remain over Iran's ballistic missile programme and conflicts in Syria and Iraq.

The Trump administration, which has struck a hard line on Iran, recently declared that Iran was complying with its nuclear agreement with world powers, but warned that Tehran was not following the spirit of the accord and that Washington would look for ways to strengthen it.

The US slapped fresh economic sanctions on Iran earlier this month, designating 18 individuals and entities for supporting what it said were "illicit Iranian actors or transnational criminal activity".

During the presidential campaign last September, Trump vowed that any Iranian vessels that harass the US navy in the Gulf would be "shot out of the water".