The Lahore High Court judge, Ayesha Malik said the tests were "humiliating" and "had no forensic value"
A Pakistan court has declared "virginity tests" to be illegal while conducting rape investigation.
The practice named as "two finger test" to check if the victim has an intact hymen, this writ is going to demolish the long held outdated and unscientific law, reports BBC.
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".
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".