Railways existed long before steam engines were invented. From the mid-1500s onward, railways were used in some European mines to move heavy wagonloads of coal and mineral ore along tunnels. Later, others were built to carry coal from collieries (coal mines) to ships in nearby rivers and harbors.