Dinosaurs ruled the world for about 165 million years, towering over most other land animals. They first appeared in the Triassic Period about 250 million years ago, and rose to prominence in the Jurassic Period that followed. But after the six-mile-wide Chicxulub asteroid struck Earth on the northern end of the present-day Yucatan Peninsula, at the end of the Cretaceous Period about 66 million years ago, they went extinct.
Or did they? The truth is, all birds that walk, swim or fly across our planet are technically dinosaurs, descended from giant creatures in the same family as Tyrannosaurus Rex.
“The same way that humans are apes, are the way that birds are dinosaurs,” says Eugenia Gold, a paleontologist at Suffolk University in Boston.
Not all creatures we often think of as dinosaurs, are dinosaurs — the whole line of flying creatures known as pterosaurs, for example.
The group of reptiles, including pterodactyls, evolved before dinosaurs. They started out as smaller, flying creatures and gradually evolved into a larger species with wingspans of more than 33 feet, like the Hatzegopteryx thambema and Quetzalcoatlus northopi. That wingspan is about the size of a Cessna four-seat airplane.
Some of these early pterosaurs also may have had feathers, as the Tupandactylus imperator fossils found in Brazil revealed. But the line of pterosaurs didn’t result in any direct living descendants today — the Chicxulub asteroid drove pterosaurs to extinction.
Read more: Pterosaur Fossil Reveals the Evolutionary Origin of Feathers
Other reptiles, besides birds, that still exist today, mostly predate dinosaurs on the evolutionary tree. Crocodilians are the most closely related group. They evolved before dinosaurs and experts put crocodiles in the larger family group, archosaurs. Strictly speaking, birds are the only direct descendants of the giant, extinct dinosaurs, and crocodiles and alligators are close relatives.
In fact, crocodiles are more closely related to birds than they are to lizards and snakes, Gold says. This almost throws the outdated, but still widely believed, idea that birds are a separate species from reptiles, into a conundrum.
As for lizards and snakes, they are closely related to each other, and both evolved earlier than crocodiles and dinosaurs. Experts still contest where the evolution of turtles fits in among these groups of reptiles. And the last remaining order of reptiles — the tuatara — are more closely related to lizards and snakes than to birds and crocodiles, Gold says.
While we can say that all birds are certainly dinosaurs, we can’t say that all dinosaurs were birds. Birds are classified as theropod dinosaurs — the same clade that includes species like T. rex and Velociraptor.
Other major groups of dinosaurs, like sauropods that include creatures like Brontosaurus, and Ornithischians that include creatures like Stegosaurus, are now completely extinct.
The earliest ancestors of modern birds appeared in the Jurassic Period from a clade of theropods called Paraves. “[Theropods] get smaller, their arms get smaller, their center of mass gets shifted,” Gold says of the evolution of birds over time.
For a long time, scientists believed that Archaeopteryx was the oldest ancestor of birds. They date it back to roughly 150 million years ago in the late Jurassic Period, based on a well-preserved specimen complete with feathers that researchers found in Germany, in the 19th century. But while Archaeopteryx is also from the Paraves group, some doubt where Archaeopteryx fits in the family tree. Archaeopteryx had different shoulder mobility than birds, and with teeth, it had a long, well-developed tail, all contrasting birds.
Scientists also haven’t settled on when feathers began to appear on dinosaurs. If pterosaurs had feathers, then some suggest that all dinosaurs had some form of feathers, even if they were so few or lacking in prominence, like the hair on elephants and whales. With other theropods, it’s uncertain due to the fragile nature of feathers.
“Likely, the T. rex also had feathers, they just aren’t preserved,” Gold says.
In the Cretaceous period, toothless birds started to appear. Paleognaths may have first evolved at this time. That clade — the oldest surviving of living birds today — includes ostriches, kiwis, cassowaries and emus.
“When you see an ostrich running, it’s very dinosaur-ian,” Gold says, though she adds that their ancestors could previously fly, but lost the ability at some point.
The fowl clade, including ducks and land fowl like chickens, and neoaves — a clade that consists of nearly all the other birds of today, including penguins — began to rapidly diversify right around the major extinction of all other dinosaurs, 66 million years ago.
In other words, experts suggest birds are the living descendants of dinosaurs. But, they are more likely the surviving branch of dinosaurs.
“Dinosaurs is the name of a group, and birds belong,” Gold says.