An Egyptian security official says gunmen have attacked an army convoy east of Cairo, killing two soldiers.

The official says attackers opened fire at the convoy of mostly military trucks towing tanks and other armored vehicles on Friday morning on the road between the Suez Canal city of Ismailia and Cairo.

He says the two killed were conscripts. Two other soldiers were wounded in the attack and were taken to hospital. The official spoke on condition of anonymity because he was not authorized to talk to media.

Militants have stepped up attacks against Egyptian troops, mostly in the volatile Sinai Peninsula but also on occasion have come closer to the country's capital.

The surge followed the Egyptian military's ouster of Islamist President Mohammed Morsi in a popularly-backed coup in July.