At least 15 policemen have been killed and seven wounded in an armed attack on a police station in North Sinai on the border between Egypt and Israel, medical and security sources said.
Egyptian state television reported that an Islamist militant group was behind the attack.
After the gunfight, the militants seized two military vehicles to attack a crossing point into Israel, the deadliest incident in Egypt's tense Sinai border region in decades.
Israeli aircraft destroyed one of the armoured vehicles and four of the gunmen were killed.
The other exploded as the militants tried to storm the Israeli border at the Kermes Shalom crossing into southern Gaza, a military zone where the Israeli, Egyptian and Gaza borders intersect, an Israeli spokesman said.
Israel's defence minister Ehud Barak called for "determined Egyptian action" to "prevent terror in Sinai".
Egypt's President Mohamed Morsi vowed he would retake control of the Sinai after the attack.
"The (security) forces will take full control of these regions," Mr Morsi said in a television address, adding he had given "clear instructions" that Egypt must take "full control of the Sinai", after the security situation deteriorated markedly following the removal of then-president Hosni Mubarak last year.
State television and and Egypt's Mena news agency reported that Egypt was closing its Rafah frontier crossing with the Hamas-controlled Gaza Strip "until further notice".
Rafah is the only crossing between Gaza and the outside world that is not under Israeli control.
Taher al Nono, a spokesman for the Hamas government, said it was closing tunnels along the border with Egypt immediately.
The attack is an early diplomatic test for Mr Mursi, who assumed office at the end of June.
It may also complicate Egypt's relations with Hamas, the Islamist rulers of the Gaza Strip that borders Egypt and Israel who are close to Mursi's Muslim Brotherhood, if it is shown that Palestinian gunmen were involved.
Israel has accused Palestinian militants in Gaza of involvement in militant activity in Sinai, which has become increasingly insecure since Mubarak was toppled.
Mr Mursi has pledged to get a grip on security in Egypt but has yet to prove he can assert control over an entrenched security establishment.