Egypt's state prosecutor was killed in a powerful bombing that hit his Cairo convoy on Monday following jihadist calls for attacks on the judiciary to avenge a crackdown on Islamists.
The health ministry and senior officials including Justice Minister Ahmed al-Zind told AFP that Hisham Barakat died in hospital hours after the morning blast in the upscale east Cairo district of Heliopolis.
Barakat, 64, was the most senior government official killed since jihadists launched an insurgency following the military overthrow of Islamist president Mohamed Morsi in 2013.
His assassination will come as a blow to President Abdel Fattah al-Sisi, the former army chief who overthrew Morsi and won elections pledging to wipe out Islamist militants.
There was no immediate claim of responsibility for the attack.
The bomb destroyed several cars and blew out shop windows, an AFP reporter said. At least five vehicles were completely gutted.
Health ministry spokesman Hossam Abdel Gaffar said eight people were wounded, including two civilians and five policemen guarding Barakat.
The attack came a day before the second anniversary of the mass protests that prompted the military to oust Morsi.
The presidency said it was cancelling celebrations to mark the anniversary of the protests and of Morsi's overthrow on July 3.
A presidency statement pledged that the "perpetrators of this terrible crime will be punished most severely".
Rights group Amnesty International in a statement condemned the "cowardly" killing, but said "authorities must not use such threats as a pretext for trampling upon human rights".
A bruised bodyguard told prosecutors what happened as Barakat's convoy headed to his office.
- 'Massive blast' -
"There was a massive blast all of a sudden," he said, in the presence of an AFP journalist. "There was glass flying everywhere. It was as if there was an earthquake."
Witnesses at the scene said one of the charred vehicles had belonged to the prosecutor.
"I heard a loud explosion and ran to the site. Barakat's car was on fire," said one, Shaama Abdel Fattah.
Bomb squad chief General Mohamed Gamal told AFP it was either a car bomb or a bomb concealed underneath a vehicle.
A prosecutor investigating the attack said Barakat had been in an armoured car but it was designed to protect him from bullets, not explosions.
Signup to our newsletter and follow us on Facebook and Twitter!
Barakat, appointed after Morsi's overthrow, was seen as a staunch opponent of the Islamist opposition, referring thousands to trial.
The bombing came after the Islamic State group affiliate in Egypt called for attacks on the judiciary following the hanging of six alleged militants.
Gunmen in the Sinai Peninsula, where the jihadists are based, had shot dead two judges and a prosecutor in May.
The group released a video on Sunday purporting to show that attack in the north Sinai city of El-Arish. Gunmen in a car pulled up to the van transporting the judges and sprayed it with rifle fire.
Monday's attack was the most brazen against a senior official in Cairo since jihadists tried to assassinate the then interior minister in a suicide car bombing in late 2013.
It marks "a pretty serious escalation", said Michael Wahid Hanna, an Egypt expert with the New York-based The Century Foundation think tank.
- 'Negative impact' -
The militants have mostly targeted police and army, although jihadists killed three South Korean tourists in a bus bombing in 2014. Police foiled an attack at a pharaonic temple crowded with tourists in Luxor earlier this month.
"I don't think the militancy is in a position to threaten the Sisi regime as long as the regime maintains cohesiveness," Hanna said.
"But it does have the capacity to have a very negative impact on Egypt."
Ansar Beit al-Maqdis, the Sinai-based organisation that later pledged allegiance to IS, claimed responsibility for the May attack.
The militants have killed scores of policemen and soldiers since Morsi's overthrow, mostly in the Sinai.
The group carried out several high-profile attacks in Cairo and the Nile valley in 2013 and 2014 before police killed or arrested its members in those areas.
On Monday, two more people were killed in Sinai when a roadside bomb struck a bus transporting provincial officials, police said.
Sisi's government has blamed Morsi's Muslim Brotherhood for the violence and pledged to eradicate the group, once Egypt's largest political movement.
At least 1,400 people, mostly Islamist supporters, have been killed in a police crackdown on protests, and much of the Brotherhood's leadership has been arrested.
Courts have sentenced hundreds to death, including Morsi himself, who was convicted of involvement in attacks on police stations.
Morsi's sentence is being appealed.