Until last week, the underground tunnels along the border between the Gaza Strip and Egypt did not seem to bother the Egyptians.
The dozens of tunnels that have long been used to smuggle weapons, basic goods, fuel and terrorists into the Gaza Strip were fine as long as they did not pose a threat to Egyptian national security and interests.
The weapons that were being smuggled into the Hamas-controlled Gaza Strip were being used against Israel, not Egypt.
For that reason, the Egyptian authorities have long turned a blind eye to the activities going on along their shared border with the Gaza Strip. This policy did not start with the arrival of Muslim Brotherhood candidate Mohamed Morsi to power in June.
Under ousted President Hosni Mubarak, the Egyptian authorities also preferred to bury their heads in the sand and pretend that all was quiet on the front with the Gaza Strip.
Why should the Egyptians be worried if the weapons were being smuggled in one direction only - from Sinai to the Gaza Strip?
And why should any Egyptian be concerned if the smuggled rockets, missiles and mortars were being fired just toward Israel?
Each time Hamas or other terror groups launched attacks against Israel, many Egyptians did not conceal their jubilation. Most used to defend the Palestinians' right to carry out "resistance attacks" against Israel.
Egyptian hypocrisy would reach its peak each time they would publicly condemn Israeli air strikes against the underground tunnels and terror groups in the Gaza Strip.
The Egyptians were the first to condemn Israel each time it fired back at terrorists who launched rockets and missiles at Israeli cities and communities.
But in the last week, the Egyptian security forces have been using military helicopters, tanks and armored vehicles to track down and kill dozens of terrorists in Sinai. The Egyptian offensive came in response to the killing of 16 border guards at the hands of Muslim terrorists in Sinai last week.
Now the Egyptians are paying a heavy price for their hypocrisy and failure to see the threat coming from extremist Islamic groups.
Last week's attack on the Egyptian military base has apparently served as a wake-up call for many Egyptians.
The Egyptians are finally learning that terrorism is a double-edged sword, and that those who approve of terror activities will one day find themselves targeted by the same terrorists.
This lesson applies not only to Egypt, but to other Arab countries such as Saudi Arabia, Syria, Lebanon and Libya, which also used to approve of terrorism, whether directly or indirectly. These countries are now getting a bitter taste of what terrorism really is.
It will take weeks, if not months, before the Egyptians regain control over Sinai and eliminate all terror cells operating in the peninsula. The security clampdown will succeed only if the Egyptians persist in their bid to cleanse Sinai of all the terror groups.
If the Egyptian authorities get tired quickly and decide to go back to sleep, they will wake up one morning to discover that Sinai and the Gaza Strip have merged to form an Islamic terror emirate.