Scientists have discovered a new insect species where the females have male-like genitals and the males have genitals like females, Live Science reported Thursday.

The insects, from the genus Neotrogla, were found in dry caves in Brazil. Scientists found a structure similar to a penis on the females, called a gynosome, which is made of muscles, membranes and spikes. The peculiarity was the same for the males, which had vagina-like genitals called phallosomes.

"Neotrogla species constitute the first cases in nature in which genitalia are reversed," said Rodrigo Ferreira, a cave biologist from the Federal University of Lavras in Brazil who co-authored the study, Live Science reported.

The study was published Thursday in the journal Current Biology.

Neotrogla were first discovered 18 years ago, but the ones with gynosomes are "a completely novel structure in evolution," said Kazunori Yoshizawa, an entomologist from Hokkaido University in Japan who led the study, Live Science reported "Evolution of such novelties is exceptionally rare, maybe comparable with the origin of insect wings."

The reversed genitals results in opposite roles during sexual intercourse, which can last from 40 to 70 hours. The female gynosome is inserted into the male to collect capsules filled with sperm.

The gynosome is so strong that when it is inside the male, it is virtually impossible to separate the two insects. During one attempt to separate the insects, scientists pulled so hard that the abdomen of the male tore off with the gynosome still in place, Live Science reported.

Scientists believe the reversed sex roles are a result of the environment they live in. Due to a lack of natural resources in the caves, the insects evolved to allow the females to reproduce frequently.

"Longer matings can allow a higher amount of semen to be transferred," Ferreira told Live Science.

"It is very likely that female Neotrogla can coercively grasp and copulate with a reluctant male," Yoshizawa told Live Science. "In animals, coercive mating is generally an exclusive feature of males."