WASHINGTON (Reuters) - A U.S. Navy ship fired warning shots toward an Iranian fast-attack craft that approached two U.S. ships, a Pentagon spokesman said on Thursday, in the most serious of a number of incidents in the Gulf area this week.

MORE FROM REUTERS:

Obama's federal appeals court appointments leave liberal legacy on U.S. law

French court blocks burkini ban

Commentary: The age of the aircraft carrier may be over

“They did feel compelled ultimately to fire three warning shots and the reason for that is... they had taken steps already to try and de-escalate this situation,” spokesman Peter Cook told reporters.

Tensions have increased in the Gulf in recent days despite an improvement in relations between Iran and the United States.

Years of mutual animosity eased when Washington lifted sanctions on Tehran in January after a deal to curb Iran’s nuclear ambitions but serious differences still remain over Iran’s ballistic missile program, Syria and Iraq.

A U.S. defense official, speaking on the condition of anonymity, said the USS Squall patrol craft fired three warning shots from a .50 caliber gun in the northern Gulf on Wednesday after warning flares did not work.

Footage taken aboard the USS Nitze shows of Islamic Revolutionary Guard vessels. via REUTERS TV

The incident started with three Iranian vessels, but there was only one around by the time the warning shots were fired, the official said. He described the Iranian behavior as “unsafe, unprofessional, and not routine.”

At one point, the Iranian vessel came within 200 yards (193 meters) of a U.S. ship, the official said.

Another interaction took place between an Iranian and U.S. ship on Wednesday, the defense official said but gave few more details.

The Pentagon earlier this week accused Iranian vessels of harassing a U.S. warship near the Strait of Hormuz on Tuesday.

On Thursday, Iran’s defense minister said those Iranian vessels were just doing their job.

“If an American ship enters Iran’s maritime region, it will definitely get a warning. We will monitor them and, if they violate our waters, we will confront them,” Defense Minister Hossein Dehghan said in a statement reported by the Iranian Students’ News Agency.

A State Department spokeswoman said it was not clear what the intentions of the Iranian ships were, but the behavior was unacceptable.

“We believe that these type of actions are of concern, they unnecessarily escalate tensions,” State Department spokeswoman Elizabeth Trudeau told a briefing.