Cairo - 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 Morsi 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 Morsi belonged.
“This is a sign of things to come. Sisi probably running for president is just going to deepen the existing hostility between the army and Islamists,” said Anna Boyd, risk analyst at IHS Jane's in London.
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 Morsi was toppled, hundreds of members of the security forces have also been killed.
Saeed's assassination came hours before Morsi appeared at a courthouse set up at a Cairo police academy to face charges of kidnapping and killing policemen after a jailbreak during the uprising.
Morsi, 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 Morsi 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 Morsi, 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 Interior Ministry confirmed Saeed's killing. He was an aide to Interior Minister Mohamed Ibrahim, who survived an assassination attempt last year.
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 Morsi 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.
Millions of Egyptians are believed to be employed in the industry, once making their living driving taxis or selling souvenirs, though that money has largely dried up since tourists stopped coming in droves over the past three years of upheaval.
Frequent bombings by Islamists, which get widespread news coverage, could greatly reduce the chances of a recovery.
Militant groups based in the largely lawless Sinai Peninsula have killed hundreds of police and soldiers since Morsi's downfall, but the Islamist insurgency appears to be taking root beyond the region that borders Israel and the Gaza Strip.
It took autocrat Hosni Mubarak several years to end an Islamist insurgency in the 1990s.
Egyptian authorities make no distinction between the Brotherhood, which says it is a peaceful movement, and al Qaeda-inspired Islamist militants in the Sinai.
“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.