The egg came first, in amniotes at least.
The key evolutionary innovation that enabled animals to leave the water and colonise land was the cleidoic egg. This important capsule has complex membranes that allow gas exchange to and from the developing embryo — letting oxygen in and carbon dioxide out — thus giving animals the ability to survive away from water.
The first land-dwelling animals were four-legged amphibians that left the water around 360 million years ago. Amniotes originated around 50 million years later and soon split into two main lineages: the mammal-line (Synapsida) and the bird-line (Reptilia).
Discoveries of fossilised live-bearing amniotes have been much more frequent and more exceptionally preserved than egg-laying amniote fossils, which has led to the widely accepted suggestion that they must have evolved earlier. However, recent findings have persuaded researcher Martin Sander to consider a different evolutionary path that amniotes might have taken.
“Egg laying is the primitive state for both mammals and reptiles, but primitive eggs with their leathery shells are unlikely to be preserved,” Sander argues in his Perspectives article in Science. “Observations on lizards show that live bearing evolves readily from egg laying (by embryo retention) but not the other way around.”
Sander suggests that these factors strongly point towards egg-laying amniotes preceding live-bearing ones. So we could be one step closer to determining the answer to the age-old question, “Which came first, the chicken or the egg?”