A Navy patrol boat fired warning shots near an Iranian naval ship that was conducting "an unsafe and unprofessional interaction" with a U.S. ship in international waters of the Persian Gulf on Tuesday, the Navy said.

Iran's Islamic Revolutionary Guard Corps viewed the incident differently, claiming a U.S. warship moved toward its patrol boat in an attempt to "instigate and frighten" its crew.

The USS Thunderbolt was involved in coalition exercises when the Iranian ship came within 150 yards, Navy Central Command said in a statement. The Iranian ship did not respond to repeated attempts to establish radio communications, and warning flares and blasts of the ship's whistle also were ignored, the Navy said.

"As the Iranian vessel proceeded toward the U.S. ship, Thunderbolt again sounded five short blasts prior to firing warning shots in front of the Iranian vessel," the Navy said. "After the warning shots were fired, the Iranian vessel halted its unsafe approach."

The Iranian vessel failed to respect maritime "rules of the road" and internationally recognized maritime customs, "creating a risk for collision," the statement said.

Read more:

Iran promises retaliation for latest U.S. sanctions

Trump sanctions Iran over missiles, terrorism after saying it complies with nuclear deal

Iran sentences American to 10 years for espionage

Not so, the Revolutionary Guard countered.

"IRGC navy patrol boat continued its mission, ignoring the unprofessional and provocative move by the US warship," the Revolutionary Guard said in a statement. "The (U.S.) warship left the zone after a while."

The incident took place a week after the Trump administration certified to Congress that Iran is complying with a complex nuclear deal cut with the West under the Obama administration. But the administration also added sanctions against the Persian Gulf nation for breaching the nuclear deal's “spirit."

Naval conflicts with Iran are nothing new. In January, a U.S. Navy destroyer fired three warning shots with a .50 caliber machine gun at four Iranian fast-attack vessels near the Strait of Hormuz. In that incident, the Iranian Islamic Revolutionary Guard boats ignored an order to halt issued via radio communication by the USS Mahan, defense officials said.

The most controversial U.S.-Iran naval clash in recent year came in January 2016 when two U.S. Navy patrol boats inadvertently crossed into Iranian territorial waters and were seized along with 10 sailors.

The boats surrendered without any shots fired. The Iranians boarded them, forced the sailors to kneel with their hands behind their heads and replaced at least one U.S. flag with an Iranian flag.

The incident was an embarrassment for the Obama administration at a time when it was aggressively defending the nuclear agreement. The sailors were freed after 15 hours, but Iran used the incident for propaganda purposes, releasing videos of the sailors kneeling with their hands on their heads.

The Iranians even videotaped a crew member making an apology scripted by the Iranians, who said the crew would not be released unless he read the script. The report said his actions violated the code of conduct for servicemen who are held captive.

A Navy investigation concluded the sailors were "derelict" in their duties the day they were captured when they took an unauthorized shortcut through Iranian waters and were ill-prepared to resist or evade the Iranian ships that pursued them.

The Navy report also chastised the Iranians, accusing them of violating basic maritime practices. The report said the Iranians were justified in their investigation of the boats but should not have taken the boats and sailors into custody.