The history of rail transport in Mauritania began in 1940, with the commencement of preparatory work for the construction of the Mauritania Railway, a single track, 704 km (437 mi) standard gauge line connecting a then proposed iron mine in Zouerate with the port of Nouadhibou, via Fderik and Choum.
Under the influence of the French colonial administration of what was then French West Africa, it was designed and built to European standards by the joint stock Societe Anonyme des Mines de Fer de Mauritanie (MIFERMA).
At about 460 km (286 mi) from Nouadhibou, the Mauritania Railway originally passed through the 2 km (1 mi) long and steeply graded Choum Tunnel, to avoid passing through part of the Río de Oro territory in Western Sahara, which was then occupied by Spain.
Since the end of the Western Sahara War in 1991, a 14 km (9 mi) diversion of the line has been built through the Polisario-controlled Free Zone of Río de Oro, thus enabling the closure of the Choum Tunnel.
It was operated initially by French built Alstom Class CC 01-21 locomotives, but these have been gradually phased out since 1997 and replaced with EMD SDL40-2 motive power.