The age-old riddle of “Which came first: the chicken or the egg?” has perplexed us for generations. But now, thanks to advances in evolutionary biology, we can finally answer this age-old question with confidence.

Most biologists agree that the egg came first. At their most basic level, eggs are just female sex cells and the invention of hard external eggs, which can be laid on land, was a game changer for vertebrates. Prior to the dawn of hard-shelled eggs, vertebrates had to rely on bodies of water to reproduce. The egg allowed amniotes to go further and further away from water and ushered in the age of dinosaurs.

The first shelled eggs evolved around 325 million years ago, according to the University of Texas at Austin’s Biodiversity Center. These early eggs were likely malleable and leathery in texture, much like the eggs laid by today’s reptiles and platypuses.

True birds didn’t show up in the fossil record until the mid- to late Jurassic, around 165 million to 150 million years ago. This means the egg came “well before the chicken,” according to paleontologist Koen Stein of the Royal Belgian Institute of Natural Sciences.

However, if we’re talking about the first chicken egg, the story changes. Chickens (Gallus gallus domesticus) likely evolved from a subspecies of red jungle fowl (Gallus gallus) around 50 million years ago. Humans living in Southeast Asia first domesticated these birds somewhere between 1650 B.C. and 1250 B.C.

At some point during the domestication process, the last ancestor of modern chickens would have laid an egg containing an embryo with enough genetic differences to make it distinct from its parent species. This embryonic chicken would have developed in the not-quite-chicken egg before hatching. Then, after reaching adulthood, it would go on to lay the first proper chicken egg. In this way, the chicken could be said to predate the chicken egg.

So which came first? While evolutionary history isn’t straightforward, most biologists agree that the egg came first, followed by the chicken. Regardless of which came first, one thing is certain: they’re both delicious!