Egypt's state-run newspaper reported an explosion from a car bomb killed prosecutor general Hisham Barakat on Monday. (Ahmed M. Ali/Facebook)

A powerful car bomb killed Egypt’s top prosecutor Monday in a high-profile assassination that underscored the apparently expanding reach of militants and their ability to mount a sophisticated strike against a well-protected senior official.

The attack targeted a convoy carrying Prosecutor General Hisham Barakat in Cairo’s upscale Heliopolis neighborhood shortly after he left his residence. The explosion ripped through the two vehicles, sending a plume of thick black smoke into the air and shattering windows in several high-rise buildings.

Barakat, 65, died later of wounds to his head, chest and stomach, medical officials said. Two of his guards and five other people were injured, officials said.

It was unclear who carried out the attack. Security officials told local news media outlets that a car packed with explosives was detonated remotely.

The blast came a day before the second anniversary of protests that toppled a government led by the Muslim Brotherhood and ushered in a military-backed leadership.

Since then, Egypt’s judiciary has played an instrumental role in the government’s campaign to jail tens of thousands of Islamists and dissidents. Judges have sentenced hundreds to death — including former president Mohamed Morsi — in what the rights group Amnesty International has denounced as “sham trials.”

As state prosecutor since 2013, Barakat oversaw all indictments in criminal cases. In a statement, the office of Egyptian President Abdel Fatah al-Sissi called him a “model of judicial integrity” who had been killed in a “heinous terrorist attack.”

In Washington, State Department spokesman John Kirby also condemned the bombing as a “terrorist attack.”

“The United States stands firmly with the Egyptian government in its efforts to confront terrorism,” he said in a statement.

This was not the first time militants have targeted Egyptian judges and other judicial officials.

In the country’s restive Sinai Peninsula, a faction pledging loyalty to the Islamic State assassinated three judges in May after opening fire on their passenger bus. Smaller explosive devices have also been detonated outside a number of courthouses, including the High Court in downtown Cairo.

A member of the Egyptian security services stands guard at the site of a bombing that killed Prosecutor General Hisham Barakat in Cairo on June 29. (Khaled Elfiqi/EPA)

But Monday’s assassination targeted the highest-ranking official to be killed in Egypt in decades and raised serious concerns about the resilience of Islamist militants battling the government.

In September 2013, a suicide bomber rammed a car packed with explosives into a convoy belonging to then-Interior Minister Mohamed Ibrahim. The top police official survived the attack, which was claimed by the group that would later announce itself as the Sinai Province of the Islamic State.

This month, gunmen thought to be linked to Islamist insurgents attempted to storm an ancient temple in Luxor , one of Egypt’s top tourist destinations. No group has claimed responsibility for that attack.

Insurgents have stepped up their attacks against the government since the 2013 coup that ousted Morsi, who hails from the Muslim Brotherhood, as Egypt’s president. There is no evidence to support the Egyptian authorities’ claims of direct ties between the insurgents and the Brotherhood.

Militant groups “will remain emboldened and will opportunistically target government officials, foreign interests and tourists,” said Hani Sabra, Middle East analyst at the Eurasia Group, a political risk consulting firm in New York. “The security situation will remain a problem.”

Many Muslim supporters of Morsi have been imprisoned, and top Brotherhood leaders, in addition to Morsi, have been sentenced to death.

Ahmed Hamdi, who lives in a sixth-floor apartment overlooking the blast site, heard the explosion about 10:30 a.m. He hunkered down in his apartment before peeking out the window.

“I heard a huge explosion,” said Hamdi, 23. “People were yelling and screaming. I saw someone injured on the ground. But there was so much black smoke.”

Hamdi said a fire caused by the explosion burned for 30 minutes before it was put out by emergency responders. Some residents said Barakat took the same route from his house to work every day.

Hours after the attack, Egypt’s Interior Ministry said it was forming a high-level task force to seek the attackers.

Brian Murphy in Washington contributed to this report.

Read more:

A year ago, Egypt carried out a massacre on the scale of Tiananmen Square

The politics of restoring Egypt’s military aid

Today's coverage from Post correspondents around the world