Throughout gastrulation and the early somite stages of development morphogenetic movements turn the endoderm into an epithelial gut tube surrounded by mesoderm. During this time the gut tube epithelium is further patterned along the anterior-posterior (A-P) axis into foregut, midgut and hindgut domains by secreted factors from the adjacent mesoderm.