FILE - The U.S. guided missile destroyer USS Stout enters Georgia's Black Sea port of Batumi, July 14, 2009. An Iranian boat crossed in front of the Stout three times at high speed Wednesday in the Persian Gulf, U.S. officials said.

U.S. Navy ships sailing in the Persian Gulf were forced to fire warning shots and flares after being harassed by Iranian vessels in recent close encounters, the Pentagon said.

In one incident Wednesday, the patrol ship USS Squall fired three warning shots into the water in the direction of an Iranian boat that was approaching another American ship head-on.

Pentagon spokesman Peter Cook told reporters Thursday that the Iranian boat came within 182 meters (200 yards) of the USS Tempest and ignored several bridge-to-bridge radio calls and warning flares. It eventually turned away.

“These were incidents that the crews deemed unsafe,” Cook said. “These are incidents that carry a risk of escalation, and we don’t desire any kind of escalation. Our ships have been operating in that part of the world for years.”

The same Iranian boat that harassed the Tempest also crossed in front of the USS Stout three times at high speed Wednesday in the same region, U.S. officials said.

The incidents involving the Iranian ships and parts of the U.S. Navy’s 5th Fleet spanned multiple days. Besides the two patrol ships, the Squall and Tempest, two U.S. destroyers, the Stout and the USS Nitze, also were involved.

William Urban, a spokesman for the 5th Fleet, said the Iranian vessels that buzzed the Nitze ignored repeated radio, whistle and flare warnings. He described the Iranian actions as “unsafe and unprofessional and not routine."

But Iran remained defiant in the face of U.S. accusations. Iran's semiofficial Tasnim news agency on Thursday quoted General Hosein Dehghan as saying, "If any foreign vessel enters our waters, we warn them, and if it's an invasion, we confront."

He added that Iranian boats patrol to monitor traffic and foreign vessels in its territorial waters.