Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

President Donald Trump announced Wednesday that he had directed the Navy to “shoot down” Iranian gunboats that harass U.S. ships, but Pentagon officials said they had received no new directives.

Trump created a stir when he made the announcement via Twitter just after 8 a.m. “I have instructed the United States Navy to shoot down and destroy any and all Iranian gunboats if they harass our ships at sea,” he wrote.

The tweet came on the morning Iran launched a military satellite and a week after the Pentagon accused Iranian vessels of harassing U.S. ships in the Persian Gulf.

Three U.S. defense officials told NBC News they were caught off guard by the tweet because the president had not ordered a change in the policy or rules of engagement. One official compared it to his 2017 tweets announcing a surprise ban on transgender people openly serving in the military.

At a press briefing a few hours after the president’s announcement, Defense Department officials characterized it as more of a warning to Iran than a shift in policy.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

“What he was emphasizing is all of our ships retain the right of self-defense, and people need to be very careful in their interactions to understand the inherent right of self-defense,” said Deputy Defense Secretary David Norquist.

“It was a very useful thing he put out,” Norquist added.

Vice Chairman of the Joint Chiefs Gen. John Hyten said “the president’s message was crystal clear,” adding, “I like that the president warned an adversary.”

An Iranian government spokesman said the country would not “succumb to intimidation and threats.”

“In the midst of a global coronavirus pandemic, while all governments are focused on combating this menace, the question is what is the U.S. military doing in Persian Gulf waters, 7,000 miles from home," said Alireza Miryousefi, a spokesman for the Iranian mission to the United Nations.

"Iran has proven that it will not succumb to intimidation and threats, nor will it hesitate to defend its territory - in accordance with international law - from any and all aggressions.”

Trump appeared to be responding to an incident on April 15 when several Iranian Revolutionary Guard Corps vessels crossed in front of U.S. Navy ships at close range in the Persian Gulf.

The Navy said the interaction with the USS Lewis B Puller and USS Paul Hamilton was unsafe and unprofessional.

There were no injuries or shots fired, and a U.S. defense official said the military hoped the encounter was a one-off, not a trend. It was the first such maritime interaction since 2018.

The U.S. and Iran were on the brink of war early this year after the president authorized a controversial operation to kill a top Iranian general. The action was taken after Iranian-backed militias killed an American contractor in Iraq.

Just two hours after his Wednesday tweet on Iranian ships, Trump retweeted a message praising him for “reminding this regime that the Obama years are gone.”

The tweet was posted by an account belonging to a Heshmat Alavi. The Intercept reported last June that Alavi is not a real person but is in fact a persona created by members of the Iranian dissident group Mujahedeen e-Khalq.