In all but the most basal (primitive) tetrapodomorphs, the excurrent nostrils have migrated from the edge of the mouth to the interior of the mouth. In tetrapods that lack a secondary palate (basal tetrapods and amphibians), the choanae are located forward in the roof of the mouth, just inside the upper jaw. These internal nasal passages evolved while the vertebrates still lived in water. In animals with complete secondary palates (mammals, crocodilians, most skinks) the space between the primary and secondary palates contain the nasal passages, with the choanae located above the posterior end of the secondary palate.