Egypt branded as "infidels" Islamist gunmen who killed 16 police near the Israeli border and promised on Monday to launch a crackdown following the massacre that has strained Cairo's ties with both Israel and Palestinians.
An Egyptian official said insurgents crossed into Egypt from the Gaza Strip before attacking the border station on Sunday. They then stole two vehicles and headed to nearby Israel, where they were eventually killed by Israeli fire.
Israeli Defence Minister Ehud Barak said on Monday that up to eight assailants were killed in the attack, adding he hoped the incident would serve as a "wake-up call" to Egypt, accused by Israel of having lost control of the desert Sinai peninsula.
The bloodshed represented an early diplomatic test for Egyptian President Mohamed Morsi, an Islamist who took office at the end of June after staunch U.S. ally Hosni Mubarak was overthrown last year in a popular uprising.
Mr. Morsi visited the border area on Monday, accompanied by the head of Egypt's military, Field Marshal Hussein Tantawi. The army sent in reinforcements and stepped up checkpoints.
Mr. Mubarak co-operated closely with Israel on security and suppressed Islamist movements such as Mr. Morsi's Muslim Brotherhood, which rejects violence to achieve its goals but whose leaders often voiced hostility toward the Jewish state.
Egypt's military, which still holds many levers of power, called the attackers "infidels" and said it had been patient until now in the face of instability in Sinai.
A largely demilitarized Sinai is the keystone of the historic 1979 peace deal between Egypt and Israel.
But for the past year there has been growing lawlessness in the vast desert expanse, as Bedouin bandits, extremists and Palestinian militants from next-door Gaza fill the vacuum, tearing at already frayed relations between Egypt and Israel.
Mr. Morsi has promised to honour the 1979 peace treaty with Israel and has done little to suggest a major shift in ties. He has also reached out to Hamas, the Islamist rulers of the Gaza Strip that borders Egypt and Israel, and Sunday's killings put an instant strain on their relations.
Egypt closed its border crossing into Gaza "indefinitely" – cutting off the sole exit route for most Palestinians at the height of the Muslim fasting month of Ramadan.
Hamas, which condemned the killings of the Egyptians, also sealed a warren of smuggling tunnels after Cairo said the gunmen had used these underground links to reach Egypt.
Many key goods, including oil, pass through the tunnels, and a prolonged closing could bring hardship to the coastal enclave. Hamas said it was working with Egypt to try to identify those behind the bloody operation.
"No Palestinian could take part in such an ugly crime and in the killing of our beloved Egyptian army men in such a horrible manner," said Hamas's Gazan government spokesman Taher al-Nono.
Deeply hostile to Israel, Hamas is nonetheless considered overly moderate by many Islamists, who condemn Egypt's 1979 peace accord and seek constant war with the Jewish state.
Last August, eight Israelis were killed in a cross-border Sinai attack blamed on Palestinian militants from Gaza. In June, an Israeli worker was killed in another incident on the desert frontier.
No one claimed immediate responsibility for Sunday's attack.
"I think it is clear that Israel and Egypt have a common interest in keeping their border quiet," Israeli Prime Minister Benjamin Netanyahu said, sending his condolences to Egypt.
Israel urged it citizens last week to leave the Sinai, citing the threat of a possible assault. On Sunday morning, an Israeli air strike killed a Palestinian gunman from a radical Islamist group in southern Gaza near the Egyptian border.
Hours later, the group of gunmen ambushed the border police – who had gathered to break the Ramadan fast after sunset – and opened fire, killing 16 and wounding at least seven.
Egypt's army said 35 militants took part in the assault, adding mortar bombs fired from Gaza landed in the area during the attack.
Some of the gunmen then sped off in the two stolen vehicles, one of which exploded at the fence, while the second, an armoured personnel carrier, travelled some 2 1/2kilometres into Israel before it was disabled by an Israeli air force missile.
"A very great disaster was prevented here," said the chief of the Israeli armed forces, Lieutenant-General Benny Gantz, adding it was "a very complicated attack by terrorists linked between the Sinai and Gaza".