Egypt's top public prosecutor was killed by a car bomb attack on his convoy on Monday, the most senior state official to die at the hands of militants since the toppling of an Islamist president two years ago.
There was no confirmed claim of responsibility. Security sources said a bomb in a parked car was remotely detonated as Hisham Barakat's motorcade left his home, after saying earlier a car bomber had rammed into the convoy.
Judges and other senior officials have increasingly been targeted by radical Islamists opposed to President Abdel Fattah al-Sisi and angered by hefty prison sentences imposed on members of the now-outlawed Muslim Brotherhood.
Last month, the Islamic State militant group's Egyptian affiliate urged followers to attack judges, opening a new front in an Islamist insurgency in Egypt..
Chief prosecutor Barakat was the highest-ranking state official to die in a militant attack since Sisi, a former army chief, ousted Islamist president Mohamed Morsi in mid-2013 after mass protests against his rule.
Morsi, a Brotherhood leader who was freely elected as Egypt's president in 2012, was sentenced this month to death over a mass jailbreak in 2011.
Monday's attack stirred fears of yet more turmoil in Egypt, which has been struggling since the 2011 popular uprising that toppled Hosni Mubarak to regain full-fledged stability and revive the economy of the Arab world's most populous country.
The bombing also showed the risk of militant Islam threatening the Egyptian state leadership, as it did in the 1980s and 1990s.
State media confirmed the death of Barakat, 64, at a hospital in the residential district of Heliopolis where he had undergone surgery hours earlier, and said he would receive a military funeral.
The Brotherhood denies any link to violence and says it is committed to peaceful activism. Its spokesman said on the group's Facebook page it rejected killing, but that responsibility for the attack on the public prosecutor lay with the authorities.
Health Minister Adel Adawi told reporters outside al-Nozha hospital where Barakat was admitted that the cause of death was "ruptures in the lung and stomach, and internal bleeding".
State news agency MENA said the bomb blast wounded at least nine other people including police and civilians.
Hours after the explosion, which sent a large plume of black smoke aloft in front of a row of apartment buildings near the military academy, six burnt cars clogged up a street strewn with broken glass and fragments of metal. Windows were shattered in surrounding buildings up to nine stories high.
"It felt like the apartment was lifted up and dropped right back on the ground. When I felt it I said to my family, this is it, death has come for us," said 17-year-old Khaled Youssef.
Sisi's office mourned Barakat's death and cancelled celebrations prepared for Tuesday to mark the anniversary of mass unrest that led to Morsi's fall, and said the perpetrators would draw "the most severe punishment".
The government, however, declared June 30 a national holiday in commemoration of the 2013 protests, state media said.
"These kinds of vicious attacks will not deter the state from continuing its path of development, the adoption of rights, and realising the hopes and aspirations of the Egyptian people," the presidency's office said in a statement according to MENA.
The Egyptian judiciary says it is independent of the government and military. But some of Egypt's judges have drawn accusations of blatant bias by handing down lengthy jail terms and mass death sentences against Islamists.
"Terrorism killed the top man of our prosecution but despite this we will not be scared and we will continue our work," said Judge Ashraf Abdelhady as he left the hospital.
A presidential spokesman told MENA that the interior ministry would increase security measures ahead of the June 30 anniversary, including heightening the alert level and reinforcing security at vital installations.
Barakat's place of work was also targeted earlier this year when a bomb exploded near the High Court in central Cairo, killing two people.
Egypt is grappling with a Sinai-based insurgency that has killed hundreds of policemen and soldiers since Morsi's fall. The most active group is Sinai Province, which has pledged allegiance to Islamic State, the ultra-hardline jihadist group that has seized control of significant areas of Iraq and Syria.
At least two people were killed and 12 wounded in a blast later on Monday likely caused by a roadside bomb near Sheikh Zuweid in North Sinai, security sources said.
Last month, suspected Islamist gunmen killed three judges in the Sinai city of al-Arish.