Human rights campaigners have welcomed a decision by a Pakistani court outlawing so-called "virginity tests" in rape examinations.
The ruling, which applies in Punjab province, will end the practice of physical checks for an intact hymen and the invasive "two-finger test".
The Lahore High Court judge, Ayesha Malik said the tests were "humiliating" and "had no forensic value".
The ruling followed two petitions filed in Punjab province by rights activists.
Campaigners have long demanded an end to virginity tests as part of the medical evaluation in rape cases, saying they have no scientific basis.
Monday's ruling applies in Punjab but may serve as a precedent for petitions in other provincial high courts. A similar petition is currently pending in the Sindh High Court.
Sameer Khosa, a lawyer representing the petitioners in the Lahore case, told the BBC the ruling had "established very clearly that the virginity test has no forensic value in any case involving sexual violence".
Mr Khosa said he hoped the relevant authorities would "reset their procedures in the light of this ruling and say goodbye to the virginity tests forever".
What is a two-finger test?
The "two-finger test" is performed manually by inserting one or two fingers into a woman's vagina to test for its laxity and for the presence of a hymen - in theory to determine whether or not the woman is sexually active and to what extent.
Some doctors claim the test can determine if a woman has been penetrated for the first time, and the test has been used to discredit victims of rape who are judged to be sexually experienced.
The World Health Organisation has categorically debunked the test, saying it has no scientific merit and is a human rights violation.
In her ruling, Justice Malik said the test was "highly invasive" and had "no scientific or medical requirement".
"It is a humiliating practice, which is used to cast suspicion on the victim, as opposed to focusing on the accused and the incident of sexual violence," she said.
Sahar Bandial, one of the lawyers who filed the petition in the Lahore case, said the tests were used to discredit women based on unscientific assessments of their sexual history.
"There is an inference that the woman is of easy virtue and likely to have consented to sexual activity," Ms Bandial said.
A global problem
Women rights campaigners have long argued that the so-called virginity test is part of a traditional patriarchal culture that shifts blame onto women in the event of sexual assaults.
Relatively few rapes are reported in Pakistan, as survivors can face social stigma. In cases that are reported, few offenders are convicted because of weak laws and complicated procedures.
There was national outrage in September after a woman in Lahore was gang-raped in front of her children when her car broke down by the side of the road. The case prompted protests across the country and led the president to approve a tough new rape bill designed to speed up trials.
But invasive "virginity tests" continue in Pakistan, and remain legal in parts of the country not affected by the ruling in Lahore. The practice has been in force in the South Asian region since the colonial era and has been documented in at least 20 countries worldwide, according to the UN and WHO.
In recent years, both organisations have campaigned for an end to the practice globally.
India outlawed the test in 2013, and its court order was quoted by Justice Malik in her ruling in Pakistan on Monday. Bangladesh outlawed the tests in 2018.
Afghanistan outlawed the practice in 2018, but the country's Independent Human Rights Commission said in September that women were still being forced to undergo the tests.
'The tip of the iceberg'
Responding to Monday's ruling, Pakistan's Federal Minister for Science and Technology, Chaudhry Fawad, welcomed what he called a "landmark ruling".
And in a widely shared Twitter thread, activist Aiman Rizvi described how three years ago she and another activist, Zainab Hussain - one of the petitioners in the case - produced a video report that triggered the court petition in Punjab.
"I am so grateful to all the women who have fought this battle for decades, and will continue fighting tomorrow," Ms Rizvi wrote. "But for the rest of us, let's not forget that this is the tip of iceberg."