KABUL, Afghanistan: Afghan authorities executed five men who were convicted of armed robbery and gang rape, the Kabul police chief said, following a case that galvanized the nation in recent weeks.

Gen. Mohammad Zahir Zahir says the men were hanged on Wednesday in the Puli Charkhi prison in the Afghan capital. Then-President Hamid Karzai had approved and signed the execution order last month on his last day in office, a rare such authorization in his more than decade-long tenure.

In August, eight men, some dressed in police uniforms, stopped an Afghan family’s car outside Kabul and sexually assaulted four of the women in the family, including one who was pregnant. They were dragged out of the vehicle into an area where their male family members could hear the women screaming.

Seven men were initially sentenced to death in a trial last month, but an appeals court later reduced two of the sentences to up to 20 years in prison — verdicts upheld by the country’s Supreme Court. Three of the suspects remain at large.

The case prompted street demonstrations in support of the victims. While allowed under Afghan law, the death penalty was applied only on two occasions during Karzai’s 13-year presidency. He did not authorize the death penalty in hundreds of cases when it was sought during his tenure.

Human rights groups criticized both the speedy legal process and application of the death penalty in the rape case. The original trial lasted only two hours before convictions were announced. Human Rights Watch said the political interference and swift convictions violated the defendants’ rights to due process.