A U.S. Navy patrol boat was forced to fire three warning shots at Iranian vessels less than 24 hours after another US missile carrier was 'harassed' in an 'unsafe manner'.

The USS Squall fired shots at approaching Iranian vessels on Wednesday, barely a day after the USS Nitze was forced to change course and fired flares after Iranian patrol boats came within 300 yards at speed.

The incident involving the USS Squall was just one of three separate confrontations involving American and Iranian ships in a single day, Pentagon press secretary Peter Cook said.

Scroll down for video

Flares fired by the USS Nitze after Iranian patrol boats 'harassed' it, forcing it to change its course

Four of Iran's Islamic Revolutionary Guard Corps vessels (one pictured) 'harassed' a U.S. warship, the USS Nitze, on Tuesday near the Strait of Hormuz, a U.S. defense official said.

The USS Squall (pictured) was forced to fire three warning shots at Iranian patrol vessels on Wednesday, just a day after the USS Nitze was forced to change course after being 'harassed'

Navy officials said four Iranian revolutionary Guard vessels approached the Nitze (pictured) at high speed and behaved in an 'unsafe and unprofessional' manner

News of the altercations emerged as Iran said it will continue to warn and confront any vessels that stray into its waters.

General Hosein Dehghan told the semi-official Tasnim news agency 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.

The USS Nitze was passing through international waters in the Strait of Hormuz, a narrow and strategic waterway between Iran and the United Arab Emirates, when it was confronted on Tuesday.

Four of Iran's Islamic Revolutionary Guard Corps (IRGC) vessels 'harassed' the Nitze, a U.S. defense official said.

The official, speaking on the condition of anonymity, said on Wednesday that two of the Iranian vessels came within 300 yards of the USS Nitze in an incident that was 'unsafe and unprofessional.'

The vessels harassed the destroyer by 'conducting a high speed intercept and closing within a short distance of Nitze, despite repeated warnings,' the official said.

IRGC, the Islamic Republic's praetorian guard, is suspicious of U.S. military activity near Iran's borders and appears to be sticking to a familiar posture in the Gulf that predates last year's nuclear accord between Iran and six world powers, including the United States.

The United States and other countries are concerned about Iran's support for Syrian President Bashar al-Assad, its ballistic missile program, and its backing for Shiite militias that have abused civilians in Iraq.

The U.S. defense official said that in Tuesday's incident, the USS Nitze tried to communicate with the Iranian vessels 12 times, but received no response.

It also fired 10 flares in the direction of two of the Iranian vessels.

'The Iranian high rate of closure... created a dangerous, harassing situation that could have led to further escalation, including additional defensive measures by Nitze,' the official said.

USS Nitze had to change course in order to distance itself from the Iranian vessels, the official said, adding that the incident could have led to a diplomatic protest, but the United States does not have diplomatic relations with Iran.

It remains to be seen whether these actions were carried out by rogue Revolutionary Guard commanders or sanctioned by senior officials in Tehran, said Karim Sadjadpour, an Iran expert at the Carnegie Endowment for International Peace.

'For four decades the Revolutionary Guard have been told that America is the greatest threat to the Islamic Revolution,' said Sadjadpour.

'This institutional culture hasn't changed after the nuclear deal,' he added.

The encounter occurred in international waters in the strait, a vitally important choke point with Iran to its north and the United Arab Emirates to the south

The encounter occurred in international waters in the strait, a vitally important choke point with Iran to its north and the United Arab Emirates to the south.

This was not the first maritime scare between the United States and Iran.

In January, 10 U.S. sailors aboard two patrol craft were detained by the IRGC when they inadvertently entered Iranian territorial waters.

They were released the next day after being held for about 15 hours.