KABUL, Afghanistan — Women and girls in Afghan jails are frequently subjected to forced virginity tests, advocates from Afghanistan’s human rights commission said on Tuesday, calling for an end to a discredited practice that is both invasive and degrading.

A report by Afghanistan ’s Independent Human Rights Commission, based on interviews with 53 female detainees across 12 of the country’s 34 provinces, found that 48 of them, including girls as young as 13, had been sent for virginity tests. The procedure, which has widely been found to be scientifically invalid, is frequently conducted in the presence of many people and in an invasive manner that could amount to rape or torture, the report said.

President Ashraf Ghani, who has not been briefed on the findings, was “deeply saddened” by reports of the practice, and had asked the human rights commission for a full review, said Sayed Zafar Hashemi, a spokesman for Mr. Ghani.

Around 750 women and girls are being held in jails and prisons across 29 provinces, according to Afghanistan’s Interior Ministry. Most of the women were detained on vague charges of “moral crimes” for running away from home — either with a lover other than the husband arranged for them by their families, or to escape domestic violence.

Although efforts to improve rights and conditions for Afghan women have been a focus since the fall of the Taliban government 14 years ago, many of the tangible gains are seen as fragile and reversible. And the country’s judicial system is one area where rights reforms have met particular resistance.

“There is a loophole in the law, and it has given an open hand to the judges and legal system,” said Dr. Soraya Sobhrang, a human rights commissioner and one of the authors of the report. “The women’s shelters are sending women for the tests, the Ministry of Women’s Affairs is sending them and the police are sending them. The practice in itself is abuse and against Islamic rituals.”

Virginity tests, examinations of whether the hymen is intact, are intended to establish evidence for cases of adultery. But Dr. Sobhrang, a gynecologist, said the tests had often been scientifically questioned because the status of the hymen is not just determined by sexual intercourse.

Heather Barr, a senior researcher for the group Human Rights Watch, said banning such tests would be an important step. “Purported virginity exams are so unreliable that the World Health Organization has said that they have no scientific validity and health workers should never conduct them,” she said.

Ms. Barr added that the tests’ continued use “is part of a broader pattern of abuses in which women and girls in Afghanistan are jailed on spurious ‘moral crimes’ accusations, often in situations where they are fleeing forced marriage or domestic violence.”

“The government should end these arrests entirely and reform the law that permits them,” she said.

Many of the women interviewed for the report said they had to go through the test in the presence of multiple people, including male police officers on some occasions. One woman in northeastern Badakhshan Province said she had been subjected to the test four times, once in the presence of six medical workers.

“Sometimes the doctor just writes, ‘The hymen is not broken, but it is possible that it was anal penetration,’” Dr. Sobhrang said. “That one question mark sends people to jail and keeps bringing them back for more tests. The victim gets victimized again and again.”