For decades male rock stars have been known for an unrivaled ability to draw hordes of admiring female fans. Now researchers may have uncovered a scientific reason for their attractiveness to the opposite sex.

A study suggests that woman in their most fertile phases are more attracted to men who can produce the best music.

Researchers from the University of Sussex said the findings indicated that women believed men with strong musical abilities carried better genes than those lacking in such skills.

The study involved nearly 1,500 women with an average age of 28, who were not breastfeeding, pregnant or using hormonal contraception.

A group of women were asked whether they would prefer the composer of one simple melody, or a second more complex piece.

In each case they were asked whether they would prefer the composer as a short-term sexual partner, or a longer-term partner in a committed relationship.

The results showed that women only preferred composers of more complex music as short-term sexual partners when the risk of conception was at its highest, according to the study.

The same trend did not emerge when women were asked about visual artists, according to Benjamin Charlton, the paper's author.

The study, published in The Proceedings Of The Royal Society B, could account for the early origins of music and why creative individuals are considered so desirable for short-term sexual relationships.

The researchers believe it provides the first scientific support for Charles Darwin’s theory that the prime function of music is to aid sexual courtship.

Dr Charlton said: "The ability to create complex music could be indicative of advanced cognitive abilities.

"Consequently, women may acquire genetic benefits for offspring by selecting musicians able to create more complex music as sexual partners."