The endoderm, ectoderm, and mesoderm are the three primary germ layers that form early in animal embryonic development during gastrulation. The ectoderm (outer layer) gives rise to structures such as the epidermis, hair, and the nervous system. The mesoderm (middle layer) develops into tissues including muscle, bone, blood, and the heart. The endoderm (inner layer) forms many internal linings and organs, including parts of the gastrointestinal tract, lungs, liver, and pancreas.