Iranian rockets passed within 1,500 yards of a U.S. Navy aircraft carrier in the Strait of Hormuz last week, a senior defense official confirmed Tuesday to Fox News.

Cmdr. Kyle Raines, a U.S. Central Command spokesman, said in a statement to the Associated Press early Wednesday that Iranian Revolutionary Guard naval vessels fired "several unguided rockets" after giving only 23 minutes' notice over maritime radio that a live-fire exercise would be carried out. The incident was first reported by NBC News.

Raines described the Iranian fleet's actions as "highly provocative".

"Firing weapons so close to passing coalition ships and commercial traffic within an internationally recognized maritime traffic lane is unsafe, unprofessional and inconsistent with international maritime law," the spokesman said.

While the United States has complained previously about other Iranian war games and maneuvers there, Saturday's incident comes after a series of weapons tests and other moves by Tehran following this past summer's nuclear deal.

In the time since, Iran has conducted missile tests criticized by the U.S., as well as aired footage on state television of an underground missile base. Iran also sank a replica of a U.S. aircraft carrier in February near the strait. It seized a Marshall Islands-flagged cargo ship and later released it in May after earlier surrounding U.S.-flagged cargo ship transiting the strait.

Iranian media and officials did not immediately discuss the tests Wednesday.

In addition to the Truman, the destroyer USS Bulkeley and French frigate FS Provence were in the area, as was commercial sea traffic.

A U.S. military official told The Hill newspaper that the Iranian ships approached the Truman and other vessels before announcing it was setting the live-fire exercise in motion and requesting nearby vessels to keep clear.

Minutes later, the Iranians repeated the warning and the rockets were launched. It was not immediately clear how many projectiles were fired. The Hill reported the ships departed the area after the launches.

Officials said the rockets traveled in a direction taking them away from the Truman and other shipping traffic in the strait, which conncts the Persian Gulf to the Arabian Sea and is the route for nearly a third of all oil traded by sea.

The Truman recently arrived in the Persian Gulf to provide a launching point for airstrikes against the ISIS terror group in Iraq and Syria. It replaces the USS Theodore Roosevelt, which departed the Middle East this past October. The French aircraft carrier Charles De Gaulle is also in the Gulf to perform similar functions.

The Strait of Hormuz is only about 21 miles wide at its narrowest point between Iran and Oman. Ships traversing the chokepoint have even less room to maneuver. The shipping lane in either direction is only 2 miles wide, with a 2-mile buffer zone between them.

The U.S. Navy's 5th Fleet is based in nearby Bahrain, on the southern coast of the Gulf. It conducts anti-piracy patrols in the greater Gulf and serves as a regional counterbalance to Iran.

While the U.S. didn't retaliate to Saturday's rocket test, the Strait of Hormuz has been the scene of a battle between the two countries' navies. On April 18, 1988, the U.S. attacked two Iranian oil rigs and sunk or damaged six of its vessels, including two naval frigates, in Operation Praying Mantis. That came after the near-sinking of the missile frigate USS Samuel B. Roberts by an Iranian mine.

A few months later, in July 1988, the USS Vincennes in the strait mistook an Iran Air flight heading to Dubai for an attacking fighter jet, shooting down the plane and killing all 290 passengers and crew onboard. The shoot-down of the jet came shortly after the U.S. vessel reported coming under fire from Iranian speedboats.

Click for more from The Hill.

The Associated Press contributed to this report.