BEIRUT (Reuters) - A U.S. Navy ship changed course toward Iranian Revolutionary Guard vessels in the Strait of Hormuz on Saturday, a guard commander was quoted as saying on Wednesday while issuing a warning.

File photo: U.S. sailors in a rigid-hull inflatable boat approach the Military Sealift Command missile range instrumentation ship USNS Invincible (L) to conduct a personnel transfer in Arabian Sea on November 21, 2012. Courtesy Deven B. King/U.S. Navy/Handout via REUTERS

A U.S. official told Reuters on Monday that multiple fast-attack vessels from the Revolutionary Guard had come within 600 yards (550 meters) of the USNS Invincible, a tracking ship, forcing it to change direction.

But guard commander Mehdi Hashemi said the incident, the first of note between the countries’ navies in those waters since January, was the fault of the U.S. ship, telling the Fars news agency: “The unprofessional actions of the Americans can have irreversible consequences,”

Years of mutual animosity eased when Washington lifted sanctions on Tehran last year after a deal to curb Iran’s nuclear ambitions. But major differences remain over Iran’s ballistic missile program and conflicts in Syria and Iraq.

Iranian president Hassan Rouhani, without referring to the Hormuz incident, also gave a warning on Wednesday.

“If Iran’s ignorant enemies think about invading Iran they should know that our armed forces are much stronger than 1980 when Iraq attacked,” he said in a speech broadcast live on state TV.

While still a U.S. presidential candidate in September, Donald Trump vowed that any Iranian vessels that harassed the U.S. Navy in the Gulf would be “shot out of the water.”

Trump’s administration said on Tuesday it would show “great strictness” over restrictions on Iran’s activities under the nuclear deal with major powers, but gave little indication of what that might mean.

The last serious naval incident was in January when a U.S. destroyer fired three warning shots at four Iranian fast-attack vessels near the Strait after they closed in at high speed and disregarded repeated requests to slow down.

Pentagon spokesman Captain Jeff Davis said in Washington on Monday that dangerous interactions were of concern because they could lead to a “miscalculation or an accidental provocation.”

“We actually had seen quite an improvement in Iran’s behavior until recently,” he said.