WASHINGTON (Reuters) - Iranian Revolutionary Guards launched rockets near the U.S. aircraft-carrier Harry S. Truman and other warships as they were entering the Gulf on Saturday, giving only brief notice in a “highly provocative” act, a U.S. military spokesman said on Tuesday.

NBC News, citing unnamed U.S. military officials, said the Guards were conducting a live-fire exercise and the Truman came within about 1,500 yards (meters) of a rocket.

“The rockets were not fired at the Truman and other ships, only near them,” the network said.

Several Revolutionary Guard vessels fired the rockets “in close proximity” of the warships and nearby merchant traffic “after providing only 23 minutes of advance notification,” said Navy Commander Kyle Raines, spokesman for the U.S. Central Command.

“These actions were highly provocative, unsafe, and unprofessional and call into question Iran’s commitment to the security of a waterway vital to international commerce,” Raines said in an email.

The Truman, accompanied by two warships from the U.S.-led coalition supporting air strikes against Islamic State militants in Iraq and Syria, was entering the Gulf through the Hormuz Strait on a routine transit when the incident occurred, he said.

NBC News said the U.S. destroyer Buckley and a French frigate were in the area where the rockets were fired.

“While most interactions between Iranian forces and the U.S. Navy are professional, safe, and routine, this event was not and runs contrary to efforts to ensure freedom of navigation and maritime safety in the global commons,” Raines said.

Iranian and U.S. forces have clashed in the Gulf in the past, especially during the Iran-Iraq war in the 1980s after the 1979 Islamic revolution.

Tehran and six world powers including the United States clinched an agreement in July that would curb Iran’s nuclear program in return for lifting economic sanctions.