The Iranian navy ship, identified as a Houdong-class by the US Naval institute, came within 800 yards of the USS Bataan helicopter carrier, USS Cole guided-missile destroyer, and the USNS Washington Chambers cargo ship and “trained a laser on a CH-53E helicopter that accompanied the formation,” Commander Bill Urban, spokesman for the Navy’s fifth fleet said in a statement to Business Insider.

The Iranian ship shined its spotlight “from bow to stern and stern to bow before heading outbound from the formation,” said Urban.

“Illuminating helicopters with lasers at night is dangerous as it creates a navigational hazard that can impair vision and can be disorienting to pilots using night vision goggles,” said Urban. The laser caused the CH-53 to fire off flares as a countermeasure.

While nobody was injured, the laser could have caused a catastrophic crash for the Marines onboard, and there’s no reason for Iran to do it besides messing with the US military or testing its resolve.

“Perhaps this was a probing effort by Iran to determine US response and the rules of engagement,” Lawrence Brennan, a former US Navy captain and an expert of maritime law at Fordham University, told Business Insider.

“With Iran,” Trump said as a candidate in September 2016, “when they circle our beautiful destroyers with their little boats, and they make gestures at our people that they shouldn’t be allowed to make, they will be shot out of the water.”

Iran’s new tactic of shining lasers, short of menacing US Navy ships with their attack craft, may show a calculated step in keeping the pressure on the US.