The foregut gives rise to the esophagus, stomach, liver, gallbladder and bile ducts, pancreas, and upper duodenum. The esophagus develops from the foregut just caudal to the lung buds. Errors in formation of septa can lead to tracheoesophageal fistulas or esophageal atresia. The stomach develops through rotation such that the left side moves ventrally and the right dorsally. Differential growth forms the greater and lesser curvatures. The pyloric sphincter separates the stomach and duodenum; errors can cause pyloric stenosis. The liver and pancreas arise from the foregut endoderm induced by nearby mesoderm.