Fast-moving Iranian vessels forced a U.S. Navy surveillance ship to change course in the Strait of Hormuz last week, U.S. officials said.

The USNS Invincible, patrolling the regional waters and accompanied by three British Royal Navy ships, was harassed by Iranian boats, which came within 600 yards on Saturday, U.S. officials told Fox News Monday.

Earlier, an Iranian vessel attempted to position itself between the Invincible and a British ship.

On Thursday an Iranian frigate came within 150 yards of the Invincible, and Saturday a number of smaller Iranian boats approached the ship, closing to within 600 yards, Pentagon spokesman Capt. Jeff Davis said.

A Navy official called the Iranian actions “unsafe and unprofessional,” The Washington Post reported.

The incidents came as Iran test-fired Fateh-110 short-range ballistic missiles about 155 miles away, destroying a targeted floating barge in one case. The Invincible has radar and other equipment onboard to monitor missile launches, including foreign missile launches and tests.

The U.S. State Department said it was aware of a test of an Iranian air defense system but otherwise offered no information.

Iran tested a medium-range ballistic missile in February, in apparent violation of a U.N. Security Council resolution; the incident led to U.S. economic sanctions against 13 people and 12 businesses in Iran.

The sanctions came with a warning from President Donald Trump.

“Iran is playing with fire — they don’t appreciate how ‘kind’ President [Barack] Obama was to them. Not me!” he said.

Copyright 2017 United Press International, Inc. (UPI). Any reproduction, republication, redistribution and/or modification of any UPI content is expressly prohibited without UPI’s prior written consent.