Exactly. The attack in the Sinai had everything to do with this upheaval.
For those following at home: a couple of weeks ago, the Israeli government issued an urgent travel warning for the Sinai, due to signs of an imminent terror attack. On August 5th, a team of attackers, of a yet-unknown group (possinbly Al-Qaida-affiliated, possibly originating from the Gaza Strip) attacked an Egyptian army base while the troops were breaking their daily Ramadan fast, killed 16 soldiers, stole two Fahd armored vehicles, and headed toward the Israeli border. The first vehicle exploded at the border crossing, and the second managed to get about a mile into Israel before it and its passengers were taken out by an Israeli helicopter, supported by tanks and infantry. All of the attackers we apparently killed.
Morsi immediately fired the army’s Chief of Intelligence and the military governor of northern Sinai, and after being told that they couldn’t guarantee his security when visiting the soldiers’ funeral, the commander of the Presidential Guard as well. The attack inspired a huge amount of public anger in Egypt, and exposed the military - and especially its commanders - to charges of incompetence, especially in comparison with Israel’s prompt response. If the military’s prestige hadn’t been weakened by this affair, there’s no way Morsi couldn’t have fired the Minister of Defense, Chief of Staff and commanders of the Army, Air Force and Navy, and restricted the military’s legal powers. The Egyptian army’s political power comes not just from its troops, but from its image as the protector of Egypt, and if it can’t protect itself, then why respect it?