Moraine is the material (usually soil and rock) transported by a glacier and then deposited.
One of the moraine types created by deposited material is medial moraine. It is formed when two glaciers merge, and their edges meet form in consequence a line across the center of the new, bigger glacier. The line is formed of material from two lateral moraines of merging glaciers.
When glacier ice is melting, a ridge of material along the valley centre is left behind.