Indonesia has been urged to drop a “discriminatory and invasive” virginity tests for female military recruits, but the military insisted the practice was necessary to check whether the women are “naughty”.

Human Rights Watch on Thursday said the examinations – commonly carried out through a “two-finger test” by medics to see whether the hymen is intact – are a form of gender-based violence and unscientific.

The Indonesian military defended the practice, saying it was part of health check requirements for potential new recruits and it will continue the test.

“We need to examine the mentality of these applicants. If they are no longer virgins, if they are naughty, it means their mentality is not good,” Indonesian military spokesman Fuad Basya told the Guardian.

He said the test has been carried out “for a long time” and that it can determine whether the women have “accidentally” lost their virginity or were sexually active. He said those who failed the test are not eligible to join the military.

“We will continue to carry out the test because to be a military person, the most important thing is your mentality. Physical and intellectual requirements are secondary,” Basya said.

Human Rights Watch (HRW) urged Indonesian President Joko Widodo to immediately abolish the requirement.

“The Indonesian armed forces should recognise that harmful and humiliating ‘virginity tests’ on women recruits does nothing to strengthen national security,” HRW women’s right advocacy director Nisha Varia said.

It is not the first time the issue of virginity tests has drawn anger in Muslim-majority Indonesia, with the police facing criticism last year for subjecting women to the checks.

In a report last year, HRW highlighted that female police recruits were forced to strip naked before they were given the “two-finger test”.

In the latest research conducted between May 2014 and April this year, HRW interviewed 11 women who are military recruits and fiancées of military officers and found a similar practice is widespread in the military force. Basya however denied fiancées of officers were also subjected to the test.

In a “two-finger test”, the examining doctor notes the presence or absence of the hymen and the so-called laxity of the vagina in efforts to assess whether the women are “habituated to sexual intercourse”.

“I felt humiliated. It was very tense, it’s all mixed up,” an unidentified female military applicant who underwent the test in 2013 was quoted as saying in the research.

“What shocked me was finding out that the doctor who was to perform the test was a man.”

A female physician described how the young women were “totally unwilling” to be positioned like women given birth during the tests, saying it was a “torture”.

The research was released ahead of an international conference on military medicine on Indonesia’s resort island of Bali next week. HRW is lobbying support from the conference’s member countries – including the United States, United Kingdom and Australia – to pressure Indonesia to cease the virginity tests.

Parts of Indonesia are still socially conservative and value female virginity highly. In February, an Indonesian district on the main island of Java was forced to scrap a plan for virginity tests for high school girls in order to graduate after it sparked a huge public outcry.