Iranian media on Monday published video purporting to show a military helicopter come within yards of the USS Essex, an amphibious assault ship sailing in the Gulf of Oman.

The Pentagon accused Iran of "unsafe and unprofessional" conduct after the naval helicopter got within 25 yards of the Essex and circled the ship three times.

"Without getting into specifics, the crew of the Essex took the appropriate force protection measures they felt that they needed to, and they acted in accordance with international law," John Kirby, the Pentagon press secretary, said. The incident occurred on Nov. 11. Kirby said there was no impact on the ship’s operations.

IRANIANS MARK ANNIVERSARY OF 1979 US EMBASSY TAKEOVER BY CHANTING ‘DEATH TO AMERICA’

US Navy posted a photo of the USS Essex

The US Navy posted a photo of the USS Essex taken on Nov. 13, 2021, two days after the close encounter with the Iranian helicopter. (US Navy)

The U.S. Naval Institute (USNI News) reported that the Essex is in the Persian Gulf carrying out training operations with the HMS Queen Elizabeth, the Royal Navy’s aircraft carrier and flagship.

The Pentagon did not immediately respond to an after-hours email from Fox News. Stars and Stripes reported that the helicopter flew near the Essex’s port side and got "as low as about 10 feet off the surface of the ocean."

GET THE FOX NEWS APP

"When you have another armed force — in this case, the Iranian navy — that flies like this, you definitely run the risk of some sort of escalation and a miscalculation on either side here, and that's not helpful," he said. "This one ended peacefully, but it doesn't mean it was safe and professional. It absolutely wasn't."

The Associated Press contributed to this report