It turns out that your ex can come back to haunt you, at least for neriid flies. Scientists have discovered a new form of non-genetic inheritance, showing for the first time that fly offspring can resemble a mother's previous sexual partner, a new study describes.

This controversial idea, known as telegony, dates back to ancient Greek times, but was discredited in the early 20th Century with the advent of genetics.

To find out for themselves, scientists Dr. Angela Crean, Professor Russell Bonduriansky and Dr. Anna Kopps, all from the University of New South Wales, manipulated the size of male flies and studied their offspring.

They found that the size of young neriid flies was determined by the size of the first male the mother mated with, rather than the second male that fathered the offspring.

"Our discovery complicates our entire view of how variation is transmitted across generations, but also opens up exciting new possibilities and avenues of research," Crean, the study's lead author, said in a press release.

"Just as we think we have things figured out, nature throws us a curve ball and shows us how much we still have to learn."

The researchers propose that the phenomenon is due to molecules in the seminal fluid of the first mate being absorbed by the female's immature eggs and then influencing the growth of offspring of a subsequent mate.

Described in the journal Ecology Letters, the team produced large and small male flies by feeding them diets as larvae that were high or low in nutrients. Immature females were then mated, on two separate occasions, with either a small or large male partner. After studying the female's offspring once they reached maturity, they found that "offspring size was determined by what the mother's previous mating partner ate as a maggot," according to Crean.

These new findings raise some interesting questions about how traits are inherited, despite previous advances in genetics.