In this Dec. 29, 2016, file photo, released by the semiofficial Iranian Students’ News Agency, an S-200 missile is fired in a military drill in the Iranian port city of Bushehr, on the Persian Gulf. (Amir Kholousi/AP)

Swift-moving Iranian vessels came dangerously close to a U.S. Navy surveillance ship in the Strait of Hormuz over the weekend, U.S. officials said Monday.

The apparent harassment of the USS Invincible on two occasions, on Thursday and Saturday, came amid Iranian state media reports that Iran had tested its newly acquired S-300 missile air defense system that is designed to intercept incoming missiles.

In addition, Fox News reported that Iran had test-fired a pair of ballistic missiles that destroyed a floating barge over the weekend, but that could not be independently confirmed.

Iran fired a medium-range ballistic missile last month, apparently violating a U.N. Security Council resolution. The Trump administration responded with its first economic sanctions, placing 12 businesses and 13 people on a list that prohibits Americans from dealing with them.

The February test led President Trump to tweet, “Iran is playing with fire — they don’t appreciate how ‘kind’ President Obama was to them. Not me!”

[Trump wants to push back against Iran, but the country is more powerful than ever]

Taken as a whole, the incidents form a pattern suggesting Tehran and Washington could be squaring off for a more direct confrontation. Trump came to office condemning the Obama administration for being what he characterized as weak on Iran, and he has vowed to be tougher. Iran seems to be testing whether Trump means what he says.

In the incidents involving the Invincible, an Iranian frigate came within 150 yards of the Navy ship on Thursday, a Pentagon spokesman, Capt. Jeff Davis, told reporters. On Saturday, a number of smaller boats approached the U.S. ship, closing to within 600 yards, Davis said.

Surveillance ships like the Invincible are typically equipped with scientific instruments and radar that allow them to monitor missiles and rockets from their launching to the point that they land.

A Navy official condemned the Iranian actions as “unsafe and unprofessional.”

British and U.S. warships patrol the regional waters, and three ships from Britain’s Royal Navy were reportedly accompanying the Invincible. State Department officials said they were aware of reports that Iran had tested an air defense system but could provide no further information.

But a key Senate Republican called for more than tough words in response to what he described as Iranian provocations.

“These provocative tests are just the latest example of Iran’s dangerous actions that demand a coordinated, multifaceted response from the United States,” said Senate Foreign Relations Committee Chairman Bob Corker (R-Tenn.). “The administration has already begun to push back in the way that we should, and I look forward to working with them as we prepare to introduce bipartisan legislation to deter Iran’s threatening behavior on all fronts.”