How did gills evolve into lungs?
Also asked, how did gills evolve?
In jawless animals such as lampreys, gills form from the embryo's innermost layer of cells, or 'endoderm', whereas in jawed vertebrates, including many fish species, gills were thought to develop from the outermost layer, or 'ectoderm'. This led scientists to think that gills evolved separately in the two lineages.
In this way, did tetrapod lungs evolve from gills?
The common ancestor of the lobe- and ray-finned fishes had lungs as well as gills. Modern tetrapods, on the other hand, bear evidence indicating that we once had gills but that these were lost in the course of our early evolution.
Traditional wisdom has long held that the first lungs, simple sacs connected to the gut that allowed the organism to gulp air under oxygen-poor conditions, evolved into the lungs of today's terrestrial vertebrates and some fish (e.g., lungfish, gar, and bichir) and into the swim bladders of the ray-finned fish.