(Adds Islamist protests)
By Michael Georgy
CAIRO, March 19 (Reuters) - Two Egyptian army officers were killed on Wednesday in a shootout with members of a Sinai-based Islamist militant group, the Interior Ministry said.
It said five militants were killed and four arrested when the military and police raided a bomb and weapons storage facility. The fighters belonged to Ansar Bayt al-Maqdis, one of Egypt's most active militant organisations, the ministry said.
Security sources said gunfire erupted during a raid on a militant safehouse where the men were hiding in Qalubiya province, north of Cairo. They said an army colonel and brigadier general, both bomb disposal experts, were killed.
Islamist militants based in the Sinai peninsula near Israel's border have stepped up attacks on security forces since the army toppled President Mohamed Mursi of the Muslim Brotherhood last July. About 300 security officers have been killed.
Ansar Bayt al-Maqdis has claimed responsibility for several high-profile attacks, including the bombing of a tourist bus in the Sinai last month that killed two South Koreans and an Egyptian, and an assassination attempt on the interior minister last year. Ansar also said it was behind a missile attack on a military helicopter that killed five soldiers in January.
Security sources said the militants targeted on Wednesday were linked to a March 15 attack by gunmen who killed six army officers near Cairo.
The Islamist insurgency has spread from the Sinai to other parts of the Arab world's biggest nation, including Cairo. Analysts believe attacks on security forces will increase in the coming months when a presidential election is due to take place and is widely expected to be won by army chief Field Marshal Abdel Fattah al-Sisi.
Security forces have killed hundreds of members of the Muslim Brotherhood and arrested thousands since Mursi, Egypt's first freely elected leader, was ousted by the army after mass protests against his rule.
Authorities have declared the Muslim Brotherhood a terrorist group. The Brotherhood says it is committed to peaceful activism.
On Wednesday, about 300 women, supporters of Mursi, most of them covered from head to toe in black, protested outside Al Azhar university, a venerable centre of Islamic learning. They chanted "down with military rule."
About 500 male demonstrators later took to the streets outside Al Azhar. Police fired tear gas and birdshot at them, a Reuters witness said.
Egypt's army, the largest in the Arab world, has launched several offensives against militants in the Sinai, but Islamist fighters who have mastered the terrain remain highly effective, residents say.
In the 1990s, it took the government of former president Hosni Mubarak years to stamp out an Islamist insurgency. (Writing by Michael Georgy; Editing by Janet Lawrence)