The mesoderm is the middle layer of the three germ layers that develops during gastrulation in the very early development of the embryo of most animals. The outer layer is the ectoderm, and the inner layer is the endoderm. The mesoderm forms mesenchyme, mesothelium, non-epithelial blood cells and coelomocytes. Mesothelium lines coeloms. Mesoderm forms the muscles in a process known as myogenesis, septa (cross-wise partitions) and mesenteries (length-wise partitions); and forms part of the gonads (the rest being the gametes). Myogenesis is specifically a function of mesenchyme.