U.S. officials are baffled but pleased that U.S. ships in the Persian Gulf have stopped being harassed by armed Iranian fast boats, military officials from the US Central Command said.

The boats for at least two years would dart toward the U.S. vessels as they passed through the Persian Gulf, risking miscalculation, but haven’t done so for five months, U.S. military officials said.

The officials said they hoped the respite would continue. “I hope it’s because we have messaged our readiness…and that it isn’t tolerable or how professional militaries operate,” Army Gen. Joseph Votel, who heads U.S. Central Command, told reporters traveling with him in the Middle East this week. Iranian officials didn’t respond to a request for comment.

The fast boats are typically armed with .50 caliber machine guns and rocket launchers and have come within shooting distance of American naval vessels, encounters that grew routine even though each one presents potential dangers to American vessels transiting through international waters.

In some of the more serious incidents, Iranian crews have directed spotlights at ship and aircraft crews, potentially blinding pilotspilotspilots as they conduct operations, according to U.S. military officials. In one case, an Iranian boat pointed a weapon at an American helicopter flying off a Navy vessel, officials said. In the most serious incidents, U.S. vessels have fired warning shots in return.

Since January 2016, there has been an average of more than two “unsafe or unprofessional” incidents each month, according to the U.S. military. There have been 50 such incidents in the past two years, officials said.

But in response to a query, U.S. military officials said there have been no such incidents since August 2017.”

Many officials point to the nuclear deal that President Trump that is threatening to end the sanctions relief for Tehran as a reason for the end to the provocative and dangerous behavior by the Iranians.