KABUL- Five Afghan men were hanged on Wednesday for the gang rape of four women despite the United Nations and human rights groups criticising the trial and urging new president Ashraf Ghani to stay the executions.

The brutal attack in Paghman, outside Kabul, provoked a national outcry with many Afghans demanding the men were hanged, and then-president Hamid Karzai signed their death sentences shortly before leaving office last week. Amnesty International slammed the executions as “an affront to justice”, while the European Union ambassador to Afghanistan questioned President Ghani’s commitment to human rights.

But the ministry of women’s affairs in Kabul welcomed the hangings “as a step towards ensuring social justice and defending women’s rights, and a lesson for those who think of committing such crimes.” There was no immediate comment from Ghani, who faced strong public pressure to not delay the executions after he came to power on August 29.

“Five men in connection to the Paghman incident and one other big criminal were executed this afternoon,” Rahmatullah Nazari, the deputy attorney general, told AFP. The men were hanged in Pul-e-Charkhi prison near Kabul along with Habib Istalifi, head of a kidnapping gang. “Today’s executions cast a dark shadow over the new Afghan government’s will to uphold basic human rights,” EU ambassador Franz-Michael Mellbin said on Twitter soon after the news broke. The armed gang members, wearing police uniforms, stopped a convoy of cars returning to Kabul at night from a wedding in Paghman, a scenic spot popular with day-trippers.

The attackers tied up men in the group before raping at least four of the women and stealing valuables from their victims. But the court process raised major concerns. The trial lasted only a few hours, suspects were alleged to have tortured before confessing, and Karzai called for the men to be hanged even before the case was heard. “The outcry and anger this case has caused is of course understandable... But the death penalty is not justice — it only amounts to short-term revenge,” said David Griffiths, Amnesty International’s Asia-Pacific deputy director.

 “The many fair trial concerns in this case only make these executions more unjust. It’s deeply disappointing that new President Ashraf Ghani has allowed the executions to go ahead.”

Before the executions, the UN High Commission for Human Rights had called on Ghani to refer the cases back to the courts “given the very serious due process concerns.” The accused were found guilty and sentenced at a nationally-televised trial, which attracted noisy rallies outside the courtroom calling for the death penalties. Applause erupted inside the courtroom when Kabul police chief Zahir Zahir also called for the men to be hanged.

It was only nine days between the men’s arrest and their trial, and the sentences were quickly confirmed by the appeals court and the Supreme Court. “The horrendous due process violations in the Paghman trial have only worsened the injustices of this terrible crime,” said Phelim Kine of Human Rights Watch. HRW said the case included a manipulated lineup for identification and a trial with little evidence.

The crime in the early hours of August 23 has become a symbol of the violence that women face in Afghanistan, despite reforms since the Taliban regime fell in 2001. Women’s rights have been central to the multi-billion-dollar international development effort in Afghanistan, but they still endure routine discrimination, abuse and violence. Under the Taliban’s harsh version of Sunni Islamic law, women were forced to wear the all-enveloping burqa, banned from jobs, and forbidden even to leave the house without a male chaperone.

The gang-rape unleashed a wave of public anger via protests, the media and the Internet, echoing the response to recent similar crimes in India —including the fatal attack on a student on a bus in New Delhi in 2012. According to Amnesty, Afghanistan executed two people last year, and 14 in 2012.