Rail transport in Morocco was initially developed during the protectorate. It functioned primarily as a means to mobilize colonial troops and to transport natural resources. Later, a standard-gauge network was built.