Updated

A U.S. Navy coastal patrol ship fired three warning shots at an Iranian ship that sailed within 200 yards in the Northern Persian Gulf Wednesday after one of four close calls this week involving U.S. and Iranian vessels, a U.S. official confirmed to Fox News on Thursday.

The USS Squall fired the shots, according to the official.

On Tuesday, four Iranian small boats "harassed" the USS Nitze, sailing near the guided missile destroyer in the narrow Strait of Hormuz, a U.S. Navy official told Fox News.

Other close calls this week involved the USS Tempest and USS Squall, Pentagon Press Secretary Peter Cook told reporters Thursday.

The Tempest and Squall were operating in international waters of the northern Arabian Gulf when three Iranian vessels approached at high speed, before proceeding to cross the bow of Tempest within 600 yards on three separate occasions, creating a possible collision hazard, according to the Pentagon.

Later, the Tempest and Squall were harassed by a Naser-class WAP Iranian vessel that passed within 200 yards of the Tempest. 

The situation presented a drastically increased risk of collision, according to the Pentagon.

During the encounter, Tempest fired three warning flares while attempting radio communications. The Squall resorted to firing three warning shots from their 50-caliber gun, which caused the Iranian vessel to turn away.

In another incident, the guided missile destroyer USS Stout was operating in northern Arabian Gulf when the same Iranian vessel from the second encounter harassed the Stout by conducting an unsafe intercept, according to the Pentagon.

The Tempest sounded five short blasts with the ship's whistle while attempting to establish radio communications with Iranian vessels.

The Pentagon described the incidents as "unsafe and unprofessional."

U.S. Navy video of the Nitze incident showed American sailor firing flares and sounding the warship's horn as the Iranian boats approached. The official said the Nitze was ultimately forced to change its course to avoid the Iranian ships, despite coming close to offshore oil rigs.

Earlier, U.S. Adm. John Richardson said the incident involving the Nitze reflected the greater competition the U.S. was facing at sea and underscored the naval tensions with Tehran, which include other similar incidents.

In January, Iran briefly detained 10 U.S. Navy sailors who mistakenly steered into Iranian waters.

Last December, Iranian ships fired rockets near U.S. warship and other vessels in the Strait of Hormuz, and a month later flew an unarmed drone over the USS Harry S. Truman aircraft carrier in the Persian Gulf.

Iran's semi-official Tasnim news agency quoted Gen. Hosein Dehghan as saying Thursday 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.

U.S. military officials estimate there are now 100,000 Iranian-backed forces in Iraq, with thousands more believed to be in Syria.

Fox News' Lucas Tomlinson and The Associated Press contributed to this report.