Gunmen stormed an Egyptian army checkpoint outside Cairo early on Saturday morning and killed six soldiers, including some still in their beds, officials said, in what amounted to an escalation by militants on military targets near the capital.

Just days earlier, masked men opened fire on a busload of military police inside city limits, another rare attack on soldiers this far from the restive Sinai Peninsula, where the army is fighting a counter-insurgency campaign.

Provincial security chief Major General Mahmoud Yousri told state news agency MENA that the gunmen also planted explosive devices after Saturday's attack in Shubra al-Kheima, but bomb disposal experts managed to diffuse two and detonate another in a controlled explosion.

The military blamed the Muslim Brotherhood for the attack, calling the group "terrorists" and saying they had planted the additional bombs to target rescue workers rushing to the scene.

Armed forces spokesman Colonel Ahmed Mohammed Ali said the soldiers, of a military police unit, were attacked just after morning prayers. The health ministry confirmed the death toll.

"These cowardly operations will only increase our determination to continue the war against terrorism," Ali said in comments on his official Facebook page.

Amr Darrag, former head of the foreign relations committee for the Brotherhood's political party, condemned the attack on his Twitter account and denied responsibility.

"How can the (Brotherhood) be accused (a) few minutes after the attack with no evidence or investigation?", he wrote.

Egyptian authorities say the Brotherhood has orchestrated a series of bomb attacks on police and other targets following the overthrow of President Mohammed Morsi, who hails from the Islamist group. This week, prosecutors referred about a dozen Brotherhood members to trial for allegedly forming an armed unit that has carried out attacks in the Nile Delta.

They have produced little evidence open to public scrutiny to bolster these claims, however, and most attacks have been claimed by the country's most active militant group, an al-Qaida-inspired organisation based in the Sinai called Ansar Beit al-Maqdis, or Champions of Jerusalem. The Brotherhood denies being involved in the attacks.

Authorities in recent days have also said they arrested a number of individuals they accuse of planning attacks on the police, including a group of 12 in the Delta governorate of Menoufia and others in northern Sinai.

Following Saturday's attack, the National Defense Council, headed by the president and attended by military chief and other security officials, held a meeting in which members discussed security arrangements in advance of the upcoming presidential elections. They stressed the need for an atmosphere of "security and peace" to ensure a high turnout.

Meanwhile, Giza's criminal court sentenced Zohair Garana, the Mubarak-era tourism minister, to five years in jail on corruption charges. He still faces other corruption charges in a pending case.