 At the end of the Devonian period ( 360 million years ago ) , the seas , rivers and lakes were teeming with life while the land was the realm of early plants and devoid of vertebrates , though some , such as Ichthyostega , may have sometimes hauled themselves out of the water . It is thought they may have propelled themselves with their forelimbs , dragging their hindquarters in a similar manner to that used by the elephant seal . In the early Carboniferous ( 360 to 345 million years ago ) , the climate became wet and warm . Extensive swamps developed with mosses , ferns , horsetails and calamites . Air @-@ breathing arthropods evolved and invaded the land where they provided food for the carnivorous amphibians that began to adapt to the terrestrial environment . There were no other tetrapods on the land and the amphibians were at the top of the food chain , occupying the ecological position currently held by the crocodile . Though equipped with limbs and the ability to breathe air , most still had a long tapering body and strong tail . They were the top land predators , sometimes reaching several metres in length , preying on the large insects of the period and the many types of fish in the water . They still needed to return to water to lay their shell @-@ less eggs , and even most modern amphibians have a fully aquatic larval stage with gills like their fish ancestors . It was the development of the amniotic egg , which prevents the developing embryo from drying out , that enabled the reptiles to reproduce on land and which led to their dominance in the period that followed . 
