In the world of fruit flies being an attractive female can, quite literally, be a real pain.

A study published in the journal PLoS Biology shows the most attractive female fruit flies are constantly harassed to mate, affecting their fertility.

Biologists from the University of California, Santa Barbara believe the harassment could lead to smaller families and affect fruit fly evolution.

Lead author Tristan Long, now at the Department of Ecology & Evolutionary Biology at the University of Toronto in Canada, said in many species, including fruit flies, males find large-bodied females "attractive" because they have greater capacity to produce offspring.

Seminal displacement is common in fruit flies, meaning the last male to mate with a female who has had multiple partners is most likely to sire the most offspring. This encourages males to disproportionately harass the females.

Long said the excessive male courtship and mating harms the larger females in a number of ways.

He said male courtship, which is "unrelenting" and includes songs and dances, can interfere with female feeding by forcing females to stop foraging for food to escape attention.

The act of intercourse itself is sometimes violent, while the seminal fluid the male ejects contains toxins that can harm the females.

As part of the research, individual males were exposed to two non-virgin females of differing size.

In each instance the male directed more attention toward the larger female.

When a male was housed with two non-virgins of similar body size (both large or both small), the male didn't appear to favor one or the other

"That is not to say that the males completely ignored small females. They just got less attention than the large females," said Long.

But, he said, the reproductive payoff for a male of mating with a small-bodied female was much less than with mating with a large-bodied female.

"As courting and mating can be energetically demanding to males, males may be behaving in a strategic manner -- balancing the costs against the potential benefits of courting potential mates of differing size."

Long said previous studies by the researchers have shown that female fecundity (or reproductive success) is an inherited genetic trait.

In this study they showed that although large-bodied females still had more offspring than their smaller-bodied counterparts, they did not have as many as they could.

"These coercive activities can result in attractive females becoming less fit to reproduce, which can potentially have a major effect on the entire population," said Long.

"This change in distribution of fitness represents a previously unappreciated aspect of sexual conflict -- one with important implications for the ability of beneficial genetic variation to spread through the gene pool, and ultimately for a species' capacity to adaptively evolve."