An Egyptian court has banned virginity tests for female detainees, many months after women arrested in Tahrir Square in March said they had been forced to take examinations.

Samira Ibrahim, 25, flashes the victory sign during a rally supporting women's rights in Cairo. (Ahmed Ali/AP)

After initially denying that virginity tests had taken place, a senior general in the Egyptian military in May admitted that at least 17 women had been forced to undergo the tests. Maj. Gen. Abdel Fattah al-Sisi told Amnesty International they had been carried out on female detainees to “protect” the army against possible allegations of rape, or for women looking to work for the military.

Tuesday’s ban comes as a result of a lawsuit filed by one of the detainees, 25-year-old marketing manager Samira Ibrahim, who took the military-led government court in August over the practice. “I will not give up my rights as a woman or a human being,” she said at the time.

In a video posted to YouTube in November, Ibrahim details the virginity test she was forced to undergo, in Arabic. (Click on the “CC” sign to see captions in English.)

In the video, Ibrahim says that she was detained along with 16 other women at a rally on March 9, and then held for four days. During that time, she says soldiers repeatedly beat her, gave her electric shocks, screamed at her, and then forced her to strip for a man in military clothes who checked if she was a virgin. She says she felt as if she had been raped, Public Radio International (PRI) reports.

Since bringing the case, Ibrahim says she has received death threats along with other public backlash, a result of the stigma associated with sexual abuse in the country.

“Egypt remains a very conservative society, and even talking about the fact that these virginity tests took place is very difficult for young women,” Heba Morayef of Human Rights Watch told PRI. “Most of the women who’ve been subjected to these forced virginity tests have not wanted to come forward.”

Ibrahim says she made the decision to come forward so that other women would not have to go through what she did.

On Tuesday, a small group of women gathered outside the courthouse building, holding banners as the decision was made, the AP reports.

Ibrahim celebrated the decision her own way: by smiling broadly at cameras, and flashing the victory sign.

From inside the courtroom:

More world news coverage:

- Grim toll as drug trade expands in Honduras

- In Pakistan’s hillside capital, it’s always the Year of the Pig

- Plea for help for Homs as violence grows in Syria

- Read more headlines from around the world