WASHINGTON (Reuters) - A U.S. Navy ship fired warning shots when an Iranian vessel in the Gulf came within 150 yards (137 meters) on Tuesday in the first such incident since President Donald Trump took office in January, U.S. officials said.

The last major incident was earlier in January, though there have been instances when a U.S. vessel fired a flare as well as an event in March when a U.S. Navy ship was forced to change course after multiple fast-attack vessels from the Islamic Revolutionary Guard came too close.

In a statement, U.S. 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 U.S. official, speaking on the condition of anonymity, said the Iranian boat was armed but that the weapons were unmanned. The Thunderbolt was accompanied by a number of other vessels, including those from the U.S. Coast Guard.

The Islamic Revolutionary Guard’s navy issued a statement on Tuesday noting that an American “battleship” moved toward 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 Guards.

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

Years of mutual animosity had eased when Washington lifted sanctions on Tehran last year as part of a deal to curb Iran’s nuclear ambitions. But serious differences remain over Iran’s ballistic missile program 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.

During the presidential campaign last September, Trump vowed that any Iranian vessels that harass the U.S. Navy in the Gulf would be “shot out of the water.”

Such incidents occur occasionally. In January, a U.S. 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.