The evolution of the amniotic egg allowed later vertebrates to lay eggs away from water.
Amniotic vertebrates branched off into reptiles and synapsids.
Synapsids (such as this Dimetrodon and the modern Muskrat) possess one opening behind the eye socket, and later evolved into mammals.