KABUL, Afghanistan -- An Afghan appeals court on Monday sentenced five men to death for armed robbery and sexual assault for an attack on an Afghan family driving home from a wedding just outside Kabul.

The panel of three judges, led by Judge Sediqullah Haqiqqi, also invalidated the death sentences given to two other defendants, whose sentences were reduced to 20 years in prison for unrelated crimes. A lower court earlier this month sentenced the seven men to death.

Prosecutors said that a group of eight men, some dressed in police uniforms, stopped the family's car last month and raped the four women in the group -- one of whom was pregnant -- in an area close to the capital known as Paghman. The family members -- women, men and children -- were beaten and their valuables stolen by the attackers.

Three of the eight suspects in the attack remain at large.

The case prompted street demonstrations in support of the victims, and President Hamid Karzai called for the men's execution. 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.

"The police and court have responded to a horrific crime with a botched trial that makes a mockery of justice for both victims and defendants," Phelim Kine, deputy Asia director at Human Rights Watch, said in a statement earlier this month. "This case sadly demonstrates that the Afghan justice system, despite more than a decade of promised reform, still has a long way to go before genuine justice is handed down."

Haqiqqi, the appeals court judge, said he expects the case to be appealed to Afghanistan's Supreme Court.