President Trump said Wednesday that he's instructed the U.S. Navy to "shoot down and destroy" any Iranian gunboats harassing American ships, in the wake of a tense encounter in the Persian Gulf.

"I have instructed the United States Navy to shoot down and destroy any and all Iranian gunboats if they harass our ships at sea," Trump tweeted.

The encounter happened last week. Six U.S. Navy warships were conducting drills with US Army Apache attack helicopters in international waters off Iran last Wednesday when they were repeatedly harassed by 11 Iranian Islamic Revolutionary Guard Navy vessels, the U.S. Navy’s 5th Fleet reported.

The Iranian ships repeatedly crossed in front and behind the U.S. vessels at extremely close range and high speeds, including multiple crossings of one ship, the Puller, with a 50-yard closest point of approach and within 10 yards of another ship, the Maui's, bow, a 5th Fleet statement said.

US NAVY CLAIMS IRAN'S NAVY TAUNTS SHIPS IN PERSIAN GULF

The Navy also reported that the USS Paul Hamilton, USS Firebolt, USS Sirocco and USCGC Wrangell, as well as the Puller and Maui, were involved in the exercises.

Six US Navy vessels conducting drills with US Army Apache attack helicopters in international waters off Iran Wednesday were repeatedly harassed by 11 Iranian Islamic Revolutionary Guard Navy vessels, the US Navy’s 5th Fleet reported. (5th Fleet, US Navy Photo)

Six US Navy vessels conducting drills with US Army Apache attack helicopters in international waters off Iran Wednesday were repeatedly harassed by 11 Iranian Islamic Revolutionary Guard Navy vessels, the US Navy’s 5th Fleet reported. (5th Fleet, US Navy Photo)

The U.S. crews responded by issuing multiple warnings via radio -- including five short blasts from the ships’ horns and long-range acoustic noise maker devices, but received no response from the IRGCN, the Navy’s 5th Fleet said in a statement.

After approximately an hour, the Iranian vessels responded to the radio queries, before maneuvering away from the U.S. ships and increasing the distance between them, according to the Navy.

IRAN SUSPECTED OF SEIZING, RELEASING HONG KONG-FLAGGED TANKER NEAR STRAIT OF HORMUZ

The Navy said that the Iranian’s dangerous and provocative actions “increased the risk of miscalculation and collision” and were in violation of international maritime “rules of the road.” The Navy also said they were not in accordance with international law to act safely with other vessels in the area.

The incident last week came one day after Iranian gunmen stormed a Hong Kong-flagged tanker in the Strait of Hormuz before quickly leaving when they learned the vessel was from China.

In this Wednesday, April 15, 2020, photo made available by U.S. Navy, Iranian Revolutionary Guard vessels sail close to U.S. military ships in the Persian Gulf near Kuwait. A group of 11 Iranian naval vessels made "dangerous and harassing" maneuvers near U.S. ships in the Persian Gulf near Kuwait on Wednesday, in one case passing within 10 yards (meters) of a U.S. Coast Guard cutter, U.S. officials said. Iranian officials did not immediately acknowledge the incident. (U.S. Navy via AP)

In this Wednesday, April 15, 2020, photo made available by U.S. Navy, Iranian Revolutionary Guard vessels sail close to U.S. military ships in the Persian Gulf near Kuwait. A group of 11 Iranian naval vessels made "dangerous and harassing" maneuvers near U.S. ships in the Persian Gulf near Kuwait on Wednesday, in one case passing within 10 yards (meters) of a U.S. Coast Guard cutter, U.S. officials said. Iranian officials did not immediately acknowledge the incident. (U.S. Navy via AP)

The U.S. Navy, Coast Guard, Marines and Army have been conducting joint interoperability operations in the Gulf since March.

The president’s directive also comes several months after hostilities between the U.S. and Iran which included an attack at the U.S. Embassy compound in Iraq that U.S. officials blamed on Iran.

In response, the U.S. carried out a strike that killed Iranian Gen. Qassem Soleimani.

Also, earlier this month, the president sent a stark warning to Iran, after claiming that Iran was planning a “sneak attack” on U.S. troops in Iraq.

"Upon information and belief, Iran or its proxies are planning a sneak attack on U.S. troops and/or assets in Iraq. If this happens, Iran will pay a very heavy price, indeed!" Trump tweeted.

Sources told Fox News earlier this month that the U.S. believes Iranian-backed proxies were planning the sneak attack, and that Trump's tweet was a warning to the Iranian leadership to tell their proxies to back down or face consequences.

Fox News' Jack Durschlag and Lucas Tomlinson contributed to this report.