The Public Prosecutor's Office in the Brazilian state of São Paulo is investigating why women are being asked to either submit to gynecological tests or, in some cases, prove their virginity in order to apply for state jobs.

The state agency opened an investigation after reports last week that women are being asked to undergo the tests before applying for a job posting at the state Education Department, Brazilian daily O Globo reports. Women under 25 who are not sexually active must provide a doctor’s note confirming their virginity.

The gynecological exams, used to screen for certain cancers, are part of a long list of health tests that the Brazilian government may ask of job applicants for coveted state jobs.

But the requirement has stirred public opinion in Brazil, where many view it as invasive to oblige women to prove their virginity or submit to a pap smear in order to apply for a job.

“It violates women's rights,” advocate Ana Paula de Oliveira Castro told the Associated Press. “It's very intimate information that she has the right to keep. It's absurd to continue with these demands.”

Several government spokespeople have criticized the requirement, O Globo reports, with one federal official saying it runs contrary to the constitution.

The state government has required the tests since at least 2012, according to the Associated Press.