(Adds ruling against Brotherhood supporters)
CAIRO, April 20 (Reuters) - Gunmen killed an Egyptian intelligence officer and a policeman on a road outside Cairo in a late-night firefight, the Interior Ministry said on Sunday.
The armed men fled the scene after shooting dead Captain Ashraf Badeer el-Qazaz of the intelligence service and a police conscript, the ministry said in a statement.
The two men were on security patrol late on Saturday on a desert road linking Cairo to the canal city of Suez when they tried to stop a vehicle, which then opened fire on them.
Islamist militants have stepped up attacks on members of the security forces and killed hundreds of them since the army toppled Egypt's first freely elected president, Mohamed Mursi, last July.
The insurgency poses a threat to national security ahead of a presidential election in May and also hurts the country's tourist industry, a key source of foreign income in Egypt.
Militants have recently shown their ability to strike beyond the Sinai Peninsula, the initial base of their attacks after Mursi was removed from power. The group Ajnad Misr claimed responsibility on Saturday for a blast in Cairo that killed one police officer on Friday.
An Egyptian court sentenced 23 people it said were members of Mursi's banned Muslim Brotherhood movement to 3-1/2 years each in prison on Saturday, judicial sources said.
The accused were jailed in connection with protests in November against the trial of Mursi. They were found guilty of charges including attacking security forces and "thuggery", among other charges.
The first sentence handed to a leader of the Brotherhood since it was outlawed last year came on Saturday, when Mohamed El-Beltagy was jailed for one year for insulting the judiciary.
Mursi himself is still standing trial in a number of cases, charged with crimes including conspiring with foreign militant groups against Egypt, which carries the death penalty.
The Brotherhood was Egypt's best organised political party until last year but the government has accused it of turning to violence since Mursi was overthrown. The movement says it is committed to peacefully resisting what it views as a military coup. (Reporting By Maggie Fick; editing by Jane Baird)