Egypt's army vowed Monday to "avenge" the killing of 16 troops by gunmen near the Israeli border and President Mohamed Morsi won US backing as he ordered his security forces to take full control of the Sinai.
In Sunday's attack, 35 gunmen in Bedouin clothing opened fire on the troops before crossing into the Jewish state in an armoured vehicle, Egyptian officials said. Israel said five gunmen were killed on its side.
The 1979 peace treaty between Egypt and Israel, under which Israel withdrew from the Sinai which it had occupied in the 1967 Middle East war, set strict limits on Egyptian troop numbers in the Sinai peninsula.
But Israel has complained of growing lawlessness on its southern border since the overthrow of veteran president Hosni Mubarak last year and called for action by Cairo.
"We swear in the name of God to avenge them," the Egyptian army said. "Anyone liaising with these groups that have attacked our troops in the Sinai in recent months will pay dearly, be it inside Egypt or abroad."
Israel said two armoured vehicles were seized, one of which exploded by itself and the other destroyed by a helicopter. The Israeli army said it found the bodies of five gunmen.
"We were ready because we had previous information from Shin Bet (security service) and from military intelligence services, which allowed us to thwart a bloody attack," military spokesman Yoav Mordechai told Israeli army radio.
Gunmen aboard the armoured vehicle "fired in every direction after entering Israeli territory before being attacked by tanks and from the air," said Mordechai.
They were "members of the global jihad based in Sinai, which has become a hothouse for world terrorism because of the weak control exercised" by Egypt, he added.
President Morsi said he had given "clear instructions" that Egypt must take "full control of the Sinai."
Morsi, who only took the oath of office on June 30 to become Egypt's first freely elected leader, said those who committed the "cowardly" attack and those who worked with them would pay dearly.
The Egyptian leader declared three days of mourning to honour the "martyrs and wounded in the same way as martyrs and wounded of the January 25 revolution" that toppled Mubarak.
The United States condemned the violence and said it was ready to help Egypt secure the increasingly lawless Sinai peninsula.
"We condemn in the strongest terms yesterday's deadly terrorist attack," acting deputy State Department spokesman Patrick Ventrell said.
If asked by the Egyptian authorities, "we stand ready to assist the government of Egypt as it acts on President Morsi's pledge to secure the Sinai and address the threats of violent extremism," Ventrell added.
The Muslim Brotherhood, from which Morsi emerged to become president, said the attack could have been the work of the intelligence services of Israel, which was a staunch supporter of Mubarak.
"This could be the work of Mossad which is trying to abort the revolution," it said on its website.
Along similar lines, Hamas's leader in the Gaza Strip, Ismail Haniya, accused Israel of carrying out the raid.
"Israel is responsible, one way or another, for this attack to embarrass Egypt's leadership and create new problems at the border in order to ruin efforts to end the (Israeli) siege of the Gaza Strip," Haniya said.
Prime Minister Benjamin Netanyahu expressed "regret" over the deaths of the Egyptian guards during a visit to the site with Defence Minister Ehud Barak.
"I think it is clear that Israel and Egypt have a common interest in keeping the border between us peaceful," Netanyahu said, adding the attack showed Israel could only rely on itself for its security.
"Nobody can fulfil this role other than the IDF (Israel Defence Forces) and the security services of the State of Israel and this is how we will continue to act."
To stop any attacks and illegal cross-border activities, Israel has speeded up construction of a wall fitted with an electronic alert system along its 240-kilometre (150-mile) border with Egypt.
Egypt said 16 soldiers and border guards were killed, while another seven were wounded. Israel said nobody from the Jewish state was hurt.
Egypt's MENA news agency said the gunmen were "jihadists" who "infiltrated from Gaza through tunnels in collaboration with jihadist elements in the Al-Mahdiya and Gabal Halal areas" inside Egypt.
The Egyptian army said there were 35 gunmen, and that they were backed by mortar fire from the Gaza Strip.
State media said Egypt was closing "until further notice" its Rafah border post with Gaza, the Palestinian territory's only crossing outside Israeli control.
Hamas dismissed the idea that militants from inside Gaza may have been involved, and put its security forces on full alert.
"The national security services are on a 100-percent state of alert to maintain common security between the Gaza Strip and Egypt," said Hamas security chief Jamal al-Jarrah.
Israel accused Sinai-based Islamists of having carried out a cross-border ambush last August that killed eight Israelis.