A U.S. Navy ship fired three warning shots in the direction of an Iranian boat that was approaching another American ship head-on in the North Arabian Gulf on Wednesday, U.S. officials said, in an escalation of encounters in the region this week.

According to a U.S. official, the Iranian boat came within 200 yards of the USS Tempest and ignored several bridge-to-bridge radio calls and warning flares. It finally turned away after the USS Squall, which was with the USS Tempest, fired three warning shots from its .50-caliber gun.

The incident was one of three encounters that U.S. ships had with Iranian Revolutionary Guard boats in the Gulf on Wednesday. And they came a day after four small Iranian boats approached the USS Nitze at high speed in the Strait of Hormuz. The boats veered off after the U.S. fired flares.

The same Iranian boat that harassed the USS Tempest also crossed in front of the USS Stout three times at a high rate of speed on Wednesday in the same region. The U.S. official called it an unsafe intercept, and said the USS Stout, a guided missile destroyer, had to maneuver to avoid a collision.

In the third incident, three Iranian boats crossed in front of the USS Tempest at high speed, coming within 600 yards of the ship. The Tempest and the Squall are patrol ships.

The official wasn't authorized to discuss the incidents publicly so spoke on condition of anonymity.

Pentagon Press Secretary Peter Cook acknowledged the three incidents Thursday, but said he did not have details. He said the U.S. ships are conducting themselves in a safe and professional manner and they will continue to take whatever steps they need to protect themselves.

Video of the incident involving the USS Nitze shows American sailors firing flares and sounding the warship's horn as the Iranian boats approached. A sailor can be heard saying that the weapons on the Iranian boats were "uncovered, manned."

Iran's defense minister said Thursday that his naval forces will warn or confront any foreign ship entering the country's territorial waters.

The semi-official Tasnim news agency quoted Gen. Hosein Dehghan as saying that "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.