The first true reptiles were either the amphibian-like and possibly transitional Westlothiana, which appeared about 350 million years ago, or the lizard-like Hylonomus, which appeared about 315 million years ago. Both these species laid hard-shelled eggs on land, the primary characteristic of reptiles.
Within about six million years of the Hylonomus, three distinct groups of reptiles had appeared. The anapsids had solid skulls and were the ancestors of turtles. The synapsids had one hole on each side of their skulls and were the ancestors of the therapsids, the ancestors of the mammals. The diapsids had two holes on each side of the skull and evolved into dinosaurs and reptiles of all sorts.