Labyrinthodontia (Greek, "maze-toothed") is an extinct amphibian subclass, which constituted some of the dominant animals of late Paleozoic and early Mesozoic eras (about 390 to 150 million years ago). The group evolved from lobe-finned fishes in the Devonian and is ancestral to all extant landliving vertebrates. As such it constitutes an evolutionary grade (a paraphyletic group ) rather than a natural group (clade ). The name describes the pattern of infolding of the dentin and enamel of the teeth, which are often the only part of the creatures that fossilize. They are also distinguished by a heavily armoured skull roof (hence the older name "Stegocephalia "), and complex vertebrae, the structure of which were used in older classifications of the group.