Petrolacosaurus

Petrolacosaurus was a small, long animal, the earliest diapsid known. It lived during the later Carboniferous period. The strata where it was found in Kansas are of Pennsylvanian age, approximately 302 million years old. 
Its diet was probably small insects. "Petrolacosaurus" had distinctive canine-like secondary-sized teeth, a trait found mainly in therapsids, and later in mammals. Its fossils were found in Kansas, USA.
"Petrolacosaurus" was too derived to be the ancestor of all modern forms. In fact, it was already a diapsid, with two openings on each side of its skull to add attachment points for jaw muscles. Hence, it cannot have been the ancestor of any synapsids, which have only one such opening. Synapsids diverged from the common amniote tree before the diapsids did.
BBC Television in "Walking with Dinosaurs" made the mistake of talking about it as an ancestor of both reptiles and mammals.