Makeshift device exploded as another one was being defused near the presidential palace in Cairo.
Egypt’s state prosecutor Hisham Barakat was killed on Monday after his motorcade was hit by a bomb blast in the capital Cairo.
“He has passed away,” Justice Minister Ahmed al-Zind told the AFP news agency at the hospital where Barakat had been taken following the bombing on Monday.
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”.
On Monday evening, the state newspaper Al Ahram reported that Zakaria Abd El-Aziz Osman has been appointed as acting prosecutor- general in place of Barakat.
Two civilians and two police officers were also reportedly injured in the attack, which took place in the Heliopolis district of Cairo, outside a military college.
Security sources said a bomb in a parked car was remotely detonated as Barakat’s motorcade left his home.
Witnesses said the bombing was strong enough to shatter glasses in nearby storefronts and homes. A large plume of black smoke and several smouldering cars were seen near a row of apartment buildings.
No one has claimed responsibility for the attack.
The now outlawed Muslim Brotherhood has condemned the killing as “unacceptable”, adding that the government is “fully responsible” for it.
“The current government which was established on the basis of violence, turned Egypt from a promising democratic country to one of mass killings and violence,” Mohammed Montasser, spokesman of the organisation, said.
In an interview with Al Jazeera from London, Maha Azzam, chief of the Egyptian Revolutionary Council, said the assassination is “a serious blow to the security situation in Cairo”.
“The message is clear, this regime is a liability” to the security of the country, she said, warning that the government could carry out “further repression” against the opposition.
The US government and UN secretary-general also condemned the attack, and called for the prosecution of those responsible in the attack.
Barakat was appointed prosecutor-general by Egypt’s then interim-President Adly Mansour in July 2013, shortly after the military ousted the country’s first freely elected president, Mohamed Morsi.
The new state prosecutor then set about freezing the assets of 15 prominent members of the Muslim Brotherhood, and ordered the arrest of the group’s leader, Mohamed Badie, on charges of inciting violence outside the Republican Guard headquarters where 51 people were killed.
The country has since sentenced Morsi, and hundreds of his supporters, to death, in mass trials that have been condemned by rights groups.
Barakat also oversaw the acquittal of former Egyptian President Hosni Mubarak.
Judges and other officials have increasingly been targeted by armed groups opposed to President Abdel Fattah el-Sisi, and apparently angered by hefty prison sentences imposed on members of Muslim Brotherhood.
There are an estimated 40,000 political prisoners in Egypt.
Last month, Egypt’s affiliate of the Islamic State of Iraq and the Levant (ISIL) group urged followers to attack judges, opening a new front in the world’s most populous Arab state.
Earlier in the same month, three judges were shot dead in the northern Sinai city of al-Arish.