An Egyptian court Tuesday ordered the military to stop conducting virginity tests on detained women protesters.

Hundreds of activists cheered the ruling of Judge Aly Fekry at the Cairo Administrative Court. The order stemmed from a complaint filed by Samira Ibrahim, 25, against a soldier who allegedly forced her to undergo a virginity test while detained at a military prison for participating in a protest rally at Tahrir Square in March. Ibrahim also accused soldiers of beating, electrocuting and strip searching women detainees.

The virginity test was apparently done so soldiers will not be accused of raping women detainees. Reacting to the verdict, military intelligence chief Adel Mursi said the court order is inapplicable.

"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, according to Al Jazeera.

Hossam Bahgat, the director of the Egyptian Initiative for Personal Rights, which represented Ibrahim in the case, welcomed the verdict but said that the charges of public indecency and disobedience on the accused soldier should be upgraded to sexual assault. Bahgat said the charges are light offense that carries a penalty of fine, so he wants a proper investigation to prosecute soldiers conducting virginity tests.