Reptiles have scales. Birds have feathers. Mammals have hair. How did we get them?

For a long time scientists thought the spikes, plumage and fur characteristic of these groups originated independently of each other. But a study published Friday suggests that they all evolved from a common ancestor some 320 million years ago.

This ancient reptilian creature — which gave rise to dinosaurs, birds and mammals — is thought to have been covered in scale-like structures. What that creature looked like is not exactly known, but the scales on its skin developed from structures called placodes — tiny bumps of thick tissue found on the surface of developing embryos.

Scientists had previously found placodes on the embryos of birds and mammals, where they develop into feathers and hairs, but had never found the spots on a reptilian embryo before. The apparent lack of placodes in present-day reptiles fueled controversy about how these features first formed.

“People were fighting about the fact that reptiles either lost it, or birds and mammals independently developed them,” said Michel C. Milinkovitch, an evolutionary developmental biologist from the University of Geneva in Switzerland and an author of the new paper. “Now we are lucky enough to put this debate to rest, because we found the placodes in all reptiles: snakes, lizards and crocodiles.”