CAIRO (Reuters) - Islamist militant gunmen on a motorcycle killed a top Interior Ministry official in Cairo on Tuesday in the latest blow to a military-backed Egyptian government struggling to curb violence and suppress dissent.
General Mohamed Saeed, head of the ministry's technical office, was shot in his car outside his home in daytime.
A Sinai-based militant group inspired by al Qaeda, Ansar Bayt al-Maqdis, said it carried out the attack against the "apostate, criminal" Saeed.
The shooting occurred hours before deposed President Mohamed Mursi appeared in court on charges of kidnapping and killing policemen after a jailbreak during the 2011 uprising that ended President Hosni Mubarak's three decades of autocracy.
Army chief Field Marshal Abdel Fattah al-Sisi ousted Mursi in July after mass protests against his rule and is expected to declare soon that he will run for president. With no challenger in sight, that would effectively return Egypt to military rule.
A Sisi presidency would delight many Egyptians, but would anger the Muslim Brotherhood, which helped Mursi become Egypt's first freely elected leader. The government has since declared it a terrorist group. The outlawed Brotherhood denies any links to the militants now waging an increasingly potent insurgency.
Also on Tuesday, gunmen killed a policeman guarding a church in October 6 city, west of Cairo, security sources said.
The Brotherhood says Sisi's removal of Mursi was a coup that reversed the democratic gains of the anti-Mubarak revolt. Hundreds of people have been killed in clashes between the security forces and Mursi supporters since August.
The authorities have crippled the Brotherhood's power to put large crowds in the streets, but now face Islamist violence that recalls an armed uprising crushed by Mubarak in the 1990s.
In its claim of responsibility for Tuesday's attack, Ansar Bayt al-Maqdis warned Sisi, the interior minister and their aides that the group would soon avenge the state's crackdown on militants.
At Mursi's trial, held in a police academy in Cairo, the deposed president was held in a glass cage with a sound system controlled by the court to prevent him shouting slogans against Sisi as he did in previous court sessions. Human rights groups see Mursi's treatment as part of a wide crackdown on opposition.
Mursi insisted he was still Egypt's true president and raged at the judge, asking: "Who are you? Don't you know who I am?"
At times Mursi, in a white track suit, paced in his cage. Other Brotherhood leaders, held in a separate glass cage, waved to people in the courtroom. The trial was adjourned to February 22.
A list of 132 defendants published by state media indicated some were Palestinians being tried in absentia. Egypt accuses the Palestinian Islamist group Hamas of helping Brotherhood leaders escape from the jail where Mursi was held in 2011.
The authorities also say Hamas, which rules the Gaza Strip, has funded Egyptian militant groups based in the nearby Sinai peninsula which have claimed responsibility for several bomb and gun attacks in recent months. Hamas denies the accusations.
The Egyptian state and militants are old enemies. Islamists in the army opposed to President Anwar al-Sadat's peace treaty with Israel assassinated him in 1981. Ayman al-Zawahri, now leader of al Qaeda, is an Egyptian who was involved in the failed Islamist uprising against Mubarak in the 1990s.
Three years after Mubarak's fall, Egypt's economy is still reeling from prolonged political uncertainty and instability.
Billions of dollars from Gulf Arab states which poured in after Mursi's overthrow have kept Egypt afloat, even though tourism revenue, a main source of foreign currency, sank by 41 percent to $5.9 billion in 2013.
Economists see little chance of a rebound while militant attacks and street clashes dominate news coverage of Egypt.
Last week six people were killed in bomb attacks targeting policemen in Cairo. And a Sinai-based militant group brought down an army helicopter with a missile, killing five soldiers.
"Political order and security are a pre-requisite for growth. Without it, there's no prospect of a recovery in investment or a pick up in the tourism industry and other risk-sensitive sectors of the economy," said Simon Williams, chief Middle East economist at HSBC.
While Egyptians see Sisi as a strong leader who can crush militancy, his biggest challenge may be to revive the economy.
The central bank has spent at least $20 billion - roughly half its reserves - to prop up the local currency since 2011.
George Kazakos, of Levant Partners asset management firm based in Greece, said the vital question was whether presidential and parliamentary elections will restore stability.
"If there are investments and opportunities, the upside for Egypt is huge," he said at an investment conference in Cairo. "What is worrying in Egypt is the politics."
(Additional reporting by Maggie Fick and Asma Alsharif; Writing by Michael Georgy; Editing by Alistair Lyon)