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.
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.
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 the desert Sinai peninsula.
A largely demilitarised 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.
Egyptian President Mohamed Mursi 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. Hamas said it was working with Egypt to try to identify those behind the bloody operation.