(CNN) -- Two Iranian warships sailed through the Suez Canal on their way to the Mediterranean Sea, canal officials said Tuesday.

They are the first such ships to sail through the Suez since the Islamic republic's 1979 revolution.

The move, which occurred four days after Egypt's post-Hosni Mubarak government gave the green light to the passage, put Egypt's new military regime in a prickly position with its Israeli neighbor.

The canal is an internal body of water, and as such, Egypt has sovereignty over it. But Egypt also is bound by the 1978 Camp David Accords, which guarantee the right of free passage by ships belonging to Israel and all other nations on the basis of the Constantinople Convention of 1888. Before that, Egypt did not allow Israeli ships to sail through the canal.

Earlier this month, Egypt's newly empowered military government said it would honor all its international treaties, including Camp David.

Israeli Prime Minister Benjamin Netanyahu accused Iran on Sunday of trying to expand its influence in the region by planning to send the warships.

Netanyahu said Israel views the crossing of the Iranian ships through the Suez Canal "gravely."

The vessels, a frigate and supply ship, are on a yearlong intelligence-gathering mission to prepare cadets to defend Iran's cargo ships and oil tankers from the threat of attack by Somali pirates, Iranian officials have said, according to Fars. The ships, which passed through the canal without incident, are headed to Syria, Fars said, citing officials.

David Schenker, director of the Program on Arab Politics at the Washington Institute for Near East Policy, said last week that both ships are armed with missiles, and warned that their passage could create more uncertainty in the region.

The Suez Canal is a key waterway for international trade. It connects the Mediterranean Sea with the Red Sea, allowing ships to navigate between Europe and Asia without having to go around Africa. Millions of barrels of oil move through the Suez every day en route to Europe and North America.