An Iranian small boat pointed a machine gun at a U.S. Navy helicopter flying off an American aircraft carrier in the Strait of Hormuz on Saturday, two U.S. defense officials told Fox News.

The two Iranian small boats were spotted approximately nine miles from the aircraft carrier while it was transiting the strait. After spotting the Iranian vessels, the aircraft carrier launched a helicopter, which had been on alert.

The helicopter next flew close to the Iranian small boats, where one of the Iranian vessels pointed its weapon at the helicopter and the pilots reported seeing that the machine gun was loaded, officials said.

The U.S. Navy helicopter then returned to USS Eisenhower after the weapon was pointed.

A Navy official called the Iranian behavior “unsafe and unprofessional,” and an “escalating measure.”

The two Iranian small boats came within a mile of the U.S. Navy aircraft carrier in the Strait of Hormuz, officials told Fox News.