Israel says it has found the bodies of eight gunmen who attacked a checkpoint on the border with Egypt, killing 16 Egyptian policemen.
The heavily armed attackers had captured a border post at Rafah, commandeered cars and tried to smash their way over the border, Israel said.
One vehicle apparently blew up at the Kerem Shalom crossing, while the other was destroyed by the Israeli air force.
Islamist militants have been blamed by both sides for carrying out the attack.
The attack on the border post close to Gaza and Israel took place at around sunset at eight o’clock, just as the guards had stopped work for the traditional iftar meal, which breaks the daily fast during the Islamic holy month of Ramadan.
Masked gunmen dressed as Bedouin nomads opened fire on police with guns and rocket-propelled grenades, Egyptian state television said.
Sixteen soldiers and border guards were killed and another seven were wounded, officials said.
Minutes later, one armoured vehicle taken by the gunmen blew up and another crossed the border into Israel before it was hit by the air force, Israeli media reported.
In all, eight militants were killed, Israel’s Defence Minister Ehud Barak told a parliamentary committee in Jerusalem.
The vehicle that blew up was loaded with explosives, the Israeli prime minister’s spokesman, Ofir Gendelman, said on Twitter.
The aim of the militants was to use stolen vehicles to target Israeli civilians, Israeli officials said.
Egypt’s state news agency quoted a top security official who said the gunmen were “jihadists” who had infiltrated from the Gaza Strip.
The Israeli army had been prepared for such an incident and had stepped up patrols along the border with Gaza, Israel Defence Forces spokesman Brig-Gen Yoav Mordechai was quoted as saying.
The Egyptian army surrounded the town of Rafah on the Egyptian side of the border in the early hours of Monday, in an attempt to stop the militants from escaping, Egyptian website al-Ahram reported.
Egypt’s President Mohammed Mursi held an emergency meeting with military and security officials after the attack.
In a televised statement, he condemned what he called a “cowardly” attack and said the security forces would “take full control” of the Sinai peninsula.
“Clear orders have been issued to all our forces. They are moving to pursue those [criminals] in order to arrest those who carried out the attack,” he said.
As the search for any remaining gunmen continues, Egypt has closed its Rafah border crossing with Gaza, our Cairo correspondent Yolande Knell reports.
The Islamist Hamas movement which governs Gaza has condemned the attack.
Mr Barak described Israel’s forces had “thwarted an attack that could have injured many” and later described the incident as a wake-up call for Egypt.
The attack will be seen as more worrying evidence that Islamist militants have a firm foothold in the restive Northern Sinai region, our correspondent says.
They have been blamed for several rocket attacks against Israel and a cross-border raid that killed nine Israelis last year.
Recently, there have also been repeated attacks on the pipeline that exports gas to Israel and Jordan. Last month, two Egyptian soldiers were shot dead.
Egypt’s military sent extra tanks and troops into the Sinai last year. The terms had to be agreed with Israel under the terms of the 1979 peace treaty between the two countries, our correspondent says.