This diversification eventually lead to the first amphibians: air-breathing, land dwelling tetrapods.
The transition to land was not complete, however, because amphibians still had to lay their eggs in water, and therefore were never far removed from an aquatic source.
It is important to remember that the development of lungs by some species of fish and the invasion of land by tetrapods are discrete events, separated by tens of millions of years.
Fish with lungs did not simply jump out of the water all
of a sudden and claim the terrestrial landscape as their own.