| RAFAH, Egypt
RAFAH, Egypt Egypt branded Islamist gunmen who killed 16 police near the Israeli border as "infidels" 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 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 Mursi, 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.
Mursi 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.
Mubarak cooperated closely with Israel on security and suppressed Islamist movements such as Mursi's Muslim Brotherhood, which rejects violence to achieve its goals but whose leaders often voiced hostility towards 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.
"But there is a red line and passing it is not acceptable. Egyptians will not wait for long to see a reaction to this event," it said in a statement on its Facebook page.
State news agency MENA cited a military official as saying a military funeral would be held in Cairo on Tuesday to honor those who died during the attack.
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.
SEALING THE BORDER
Mursi has promised to honor 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.
The Muslim Brotherhood said on its website the attack "can be attributed to Mossad," the Israeli intelligence agency, and was an attempt to thwart Mursi. It said Mossad was trying to abort the Egyptian uprising and it was "imperative to review clauses" of the agreement between Egypt and Israel.
Mursi officially left the group and his position as head of its Freedom and Justice Party when he took office.
Israel dismissed allegations of involvement in the attack.
"Even the person who says this when he looks at himself in the mirror does not believe the nonsense he is uttering," Israeli Foreign Ministry spokesman Yigal Palmor said.
In Washington, the U.S. State Department voiced skepticism Mossad might have been behind the attack and urged Egypt to improve security in Sinai.
Asked if it was conceivable the Israeli intelligence service launched the attack, State Department spokesman Patrick Ventrell told reporters that "doesn't sound right to me."
Dozens of demonstrators chanting "leave, leave" gathered in front of the residence of the Israeli ambassador in Cairo on Monday night to demand he be expelled, the state newspaper al-Ahram said.
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. 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.
Egyptian state television on Monday cited a medical source as saying six corpses that had arrived at the morgue of Arish hospital in Sinai may be the bodies of some of the assailants. It did not add further details.
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 frontier incident.
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 its 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, and 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 armored personnel carrier, travelled some 2.5-km (2 miles) 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".
(Additional reporting by Yasmine Saleh, Tamin Elyan, Shaimaa Fayed, Omar Fahmy and Ahmed Tolba in Cairo, Allyn Fisher-Ilan in Jerusalem and Nidal al-Mughrabi in Gaza; writing by Tom Pfeiffer; editing by Sophie Hares, Mohammad Zargham and Michael Roddy)