An Egyptian court ordered the Egyptian army on Tuesday to stop forced virginity tests on female detainees, months after the practice sparked a national outcry and stained the ruling military's reputation.
The Cairo Administrative Court ruled in favour of Samira Ibrahim, who sued the army over the practice, slammed by rights groups as torture and sexual violence.
Ibrahim was one of several women subjected to forced virginity tests when they were detained during a March demonstration in Cairo's Tahrir Square -- the epicentre of protests that toppled veteran strongman Hosni Mubarak.
The verdict was met with cries of joy and applause by dozens of rights activists who attended the hearing.
Hossam Bahgat, the director of the Egyptian Initiative for Personal Rights who acted for Ibrahim, welcomed the ruling as "good news."
But he said much work was still needed to ensure the criminal accountability of those who ordered and conducted the tests.
A top army official had justified the examinations, saying there were necessary to head off possible charges of rape.
Responding to the verdict, the head of military intelligence, Adel Mursi, said the ruling was "inapplicable" because there are no instructions to conduct these tests.
"There are absolutely no orders to conduct virginity tests. If someone conducts a virginity test, then it is an individual act and that person will be subject to a criminal investigation," Mursi said.
On January 3, one soldier is to face court martial in the case of the so-called virginity tests, charged with "public indecency and not following orders."
"The way the case is presented gives the impression that it was one rogue soldier acting alone," Bahgat told AFP. "For this, he could get away with just a fine.
"We are working very hard to have the charge changed to one of sexual assault. We will fight to have a proper investigation carried out," Bahgat said.
Signup to our newsletter and follow us on Facebook and Twitter!
In an emotional testimony posted on YouTube, 25-year-old Ibrahim recounted how she and other women were beaten, electrocuted and accused of being prostitutes.
She said the "virginity test" was conducted by a soldier in army fatigues in front of dozens of people.
"When I came out, I was destroyed physically, mentally and emotionally," she said.
On March 9, army officers violently cleared Cairo's Tahrir Square and held at least 18 women in detention.
Women said they were beaten, given electric shocks, subjected to strip searches while being photographed by male soldiers, then forced to submit to "virginity tests" and threatened with prostitution charges.
In May, an army general, speaking to CNN on condition of anonymity, defended the practice.
"We didn't want them to say we had sexually assaulted or raped them, so we wanted to prove that they weren't virgins in the first place," he said.
His statements sparked further furore, prompting the army to promise that no more virginity tests will be carried out in the future.
Egypt's military enjoyed hero status at the start of the January uprising for siding with the people and refusing to shoot protesters.
But the Supreme Council of the Armed Forces (SCAF), which took power when Mubarak was ousted, has come under increasing criticism for using Mubarak-era tactics to stifle dissent and for human rights abuses.
Last week, the SCAF issued a public apology to women after footage circulating on social networking sites showed army troops savagely beating female protesters.
A picture that showed one veiled protester sprawled on the ground, helmeted troops kicking her and stripping her to reveal her bra, has encapsulated the heavy hand used against the protesters and sparked international condemnation.