It turns out the ability to nurse their young — a trait unique to mammals — could have led our distant ancestors away from egg-laying, as developing offspring were able to shift from a yolk to a milk diet.

All mammals have at least four physical traits in common. We all possess hair at some point — even whales and naked mole rats. We all have three bones in our middle ear that help amplify sound. We all possess a neocortex in our brains, a structure responsible for higher brain functions. And all mammal species can produce milk.

"The reason we're known as mammals is because of our mammary glands," explained researcher Henrik Kaessmann, an evolutionary biologist at the University of Lausanne in Switzerland. "Nourishment with milk is a key feature of mammals. It's at the center of our story. And we wanted to know how that came about, how we came about."

To better understand how the distant ancestors of humanity and other mammals evolved from reptilelike creatures that laid eggs, Kaessmann and his colleagues investigated genes linked with eggs and milk.

There are three major types of mammals alive today. These include humans and other placentals, kangaroos and other marsupials, and duck-billed platypuses and the scant few remaining egg-laying monotremes. The scientists compared the genes of representatives from these different mammal lineages with those of chickens (which are egg-laying and milkless, naturally).

DNA accumulates mutations over time, serving like a clock. The new findings suggest the genes for "casein" proteins found in milk arose in the common ancestor of all mammals between 200 million and 310 million years ago.

In contrast, genes for proteins called vitellogenins that provide the nutrients found in egg yolk were gradually lost in all mammals, except the monotremes, just 30 million to 70 million years ago. (Since monotremes still lay eggs, they kept some yolk proteins.) The three genes for vitellogenins found in the chicken all became mutated, useless "pseudogenes" in placentals and marsupials, and just one functional vitellogenin gene is seen in monotremes.

The evolution of milk reduced the need that mammal offspring had for the nutrients in the yolk, and therefore reduced the need for eggs, the researchers suggest. Eventually, marsupials and placentals abandoned egg-laying completely, leading genes linked with egg yolk to mutate and stop functioning over time.

Indeed, the evolution of milk "seemed to have triggered the chain of events behind the complete loss of egg yolk genes," Kaessman explained.

"These findings shed light on the big question of when and how the transition from eggs happened in mammals," he said.

Kaessmann and his colleagues David Brawand and Walter Wahli detailed their findings online in the journal PLoS Biology.