* Senior Interior Ministry official killed in Cairo
* Attack coincides with court appearance by ousted leader
* Army chief set to announce candidacy for president soon (Adds analyst quote, details)
By Michael Georgy
CAIRO, Jan 28 (Reuters) - Gunmen on a motorbike killed a senior Egyptian Interior Ministry official outside his home in Cairo on Tuesday, putting pressure on the military-backed government as it struggles to contain an Islamist insurgency.
The death of General Mohamed Saeed, head of the technical office of the minister of interior, suggested militants were stepping up their campaign against the state at a delicate time in Egyptian politics.
Army chief Field Marshal Abdel Fattah al-Sisi, who toppled president Mohamed Mursi in July, is expected to announce his candidacy for the same post in the coming days, a move that will anger the Muslim Brotherhood to which Mursi belonged.
Sisi unveiled a political roadmap meant to lead to free and fair elections and stability when he toppled Mursi following mass protests against his rule. Egypt has instead witnessed chaos and increasingly brazen Islamist militants.
The Brotherhood accuses Sisi of staging a coup that has undermined democratic gains made since an uprising ousted autocrat Hosni Mubarak in 2011. Hundreds of its supporters were killed in clashes with security forces across Egypt in August.
In the violence since Mursi was toppled, hundreds of members of the security forces have also been killed.
Although authorities have managed to reduce the size of street protests, there is no quick solution for curbing militant violence, as the site of Saeed's assassination suggests.
A bullet shattered the window of the car he was in during broad daylight - a reminder of the Islamist insurgency that raged for several years in the 1990s until Mubarak crushed it.
Saeed's assassination came hours before Mursi appeared in court at a Cairo police academy to face charges of kidnapping and killing policemen after a jailbreak during the uprising.
Mursi, who faces charges in three other cases, was not allowed to freely scream slogans against Sisi and the army-backed government, as he did in previous court sessions.
This time he was held in a glass cage with a sound system controlled by the court, another example of the crackdown on dissent which has drawn criticism from human rights groups.
At one point Mursi said he was still the legitimate president of Egypt, and asked the judiciary not to engage in political revenge.
Screaming at the judge, he said: "Who are you? Don't you know who I am?" "I am the chief of Egypt's Criminal Court," replied the judge. At other times Mursi, in a white training suit, paced in his cage.
Other Brotherhood leaders, held in a separate glass cage, waved to people in the courtroom.
A list of 132 defendants published by state media indicated some were Palestinians still on the run. Egyptian authorities accuse the Palestinian militant group Hamas of helping Brotherhood leaders escape from the jail.
They also say Hamas has provided funding for Egyptian militant groups based in Sinai who have claimed bombing and shooting attacks like the one on Tuesday.
The Egyptian state and militants are old enemies. Islamists in the army opposed to President Anwar al-Sadat's peace treaty with Israel gunned him down in 1981.
Egypt is the birthplace to some of the world's most notorious militants, including al Qaeda leader Ayman al-Zawahri.
Political violence has hit the economy hard in Egypt, which is of strategic importance because of its peace treaty with Israel and control of the Suez Canal.
Billions of dollars from Gulf Arab states which poured in after Mursi was toppled have kept the economy afloat in the face of street protests, even though tourism revenue, a main source of foreign currency, sank by 41 percent to $5.9 billion in 2013.
Frequent bombings by Islamists, which get widespread news coverage, could greatly cut the chances of an economic rebound.
"Political order and security are a pre-requisite for growth. Without it, there's no prospect of a recovery in investment or pick up in the tourism industry and other risk-sensitive sectors of the economy," said Simon Williams, chief Middle East economist at HSBC.
"If the next phase of the (political) transition is successful, confidence may turn in the latter half of this year. But for us, recovery is a 2015 story, not before."
Militant groups based in the largely lawless Sinai Peninsula have killed hundreds of police and soldiers since Mursi's downfall, but the Islamist insurgency appears to be taking root beyond the region that borders Israel and the Gaza Strip.
Egyptian authorities make no distinction between the Brotherhood, which says it is a peaceful movement, and al Qaeda-inspired Islamist militants in the Sinai.
Analysts say authorities still don't have a full grasp of who may be behind the attacks.
"Knowing who is doing what, and who is cooperating with whom, is still a big question facing security authorities in Egypt," said Gamal Soltan, who teaches political science at the American University in Cairo.
Last week, six people were killed in a wave of bomb attacks targeting policemen in Cairo. And a Sinai-based militant group brought down an army helicopter with a missile, killing five soldiers.
While Egyptians see Sisi as a strong leader who can crush militancy, his biggest challenge may be to support the economy.
Egypt's central bank has burned through at least $20 billion - roughly half its reserves - supporting the local currency since the 2011 uprising. (Writing by Michael Georgy; Editing by Mike Collett-White)