An endostyle is a longitudinal ciliated groove on the ventral wall of the pharynx which produces mucus to gather food particles. It is found in urochordates and cephalochordates, and in the larvae of lampreys. It aids in transporting food to the esophagus. The endostyle in larval lampreys (ammocetes) metamorphoses into the thyroid gland in adults, and is regarded as being homologous to the thyroid gland in vertebrates. Since the endostyle is found in the three branches of chordates, it is presumed to have arisen in the common ancestor of these taxa, along with a shift to internal feeding for extracting suspended food from the water.