(CNN) -- The U.S. Navy had secret orders this week to be "prepared to act" to stop a cargo ship carrying Iranian arms destined for Gaza, CNN has learned.
Navy vessels in the Middle East received orders to move "into the proximity of the ship and act if ordered," according to a senior U.S. military official familiar with the operation.
The scenario included the possibility of boarding the ship, which was eventually stopped in the Red Sea by Israeli naval forces, who authorities said seized a cargo of Iranian rockets and missiles.
A second American official confirmed that U.S. intelligence and the Israelis became aware of the effort by Iran to smuggle the weapons several days ago.
The United States secretly tracked the shipment as it left Iran by air and then landed in Syria. The weapons were then shipped into Iraq and loaded at a port in southern Iraq.
U.S. and Israeli intelligence grew concerned when the cargo ship in the Persian Gulf suddenly diverted from its expected heading to Sudan and suddenly turned north toward Iraq to load up.
The United States does not believe the Iraqi government sanctioned the smuggling.
American navy ships in the region secretly tracked the cargo down the Persian Gulf to the Arabian Sea and then to the Red Sea until the Israeli navy boarded the vessel before it reached Sudan, a typical point for unloading smuggled weapons.
The Israeli military later showed video of the weapons with markings indicating they were made in Iran.
The White House hinted at the scope of the operation, but only after it concluded.
"The White House directed the Department of Defense to monitor the vessel and to develop concepts of operation for a range of options to be prepared to take unilateral steps if necessary," White House spokesman Jay Carney said.
Defense Secretary Chuck Hagel spoke Thursday with Israeli Defense Minister Moshe Ya'alon to receive what the Pentagon called a "briefing" from the Israelis on the operation.
The Pentagon said in a statement both nations "have been in consistent touch on Israel's interdiction operation, coordinating extensively through military and intelligence channels."
The seizure showed the United States was continuing to hold Iran "accountable for its destabilizing activities in the region, even as we continue efforts to resolve our concerns over Iran's nuclear program through diplomacy," the statement said.