Dimetrodon lived in the Permian, before dinosaurs, and belonged to Synapsida, the same major evolutionary branch that later produced mammals.

Dimetrodon — the sail-backed predator routinely mistaken for a dinosaur — first appeared roughly 60 million years before the earliest dinosaurs and was actually more closely related to humans than to T. rex.
Natural History

