History of rail transport in Morocco

In 1907, the French Compagnie Marocaine established a 600 mm (1 ft 11+5⁄8 in) line connecting the Port of Casablanca to a quarry in Roches Noires with a Decauville engine, though it was destroyed by tribesmen of the Shawiya.

Beginning in 1912 and ending in 1935, French Morocco had one of the largest 600 mm (1 ft 11+5⁄8 in) gauge networks in Africa with a total length of more than 1700 kilometres.

[2] After the treaty of Algeciras where the representatives of Great Powers agreed not to build any 1,435 mm (4 ft 8+1⁄2 in) standard-gauge railway in Morocco until the standard-gauge Tangier - Fes Railway being completed, the French begun to build military 600 mm (1 ft 11+5⁄8 in) gauge lines in their part of Morocco.

These lines were mostly built - with exception of Guercif - Outat Oulad el Hadj - Midelt, which was started in 1916 and completed in 1920 - during the period of 1921 - 1925.

The Mediterranean-Niger-Railway (French: Chemins de Fer de la Méditerranée au Niger (MN) ) was built between the coal mining region near Bou Arfa in the east of Morocco and the Algerian rail system at Oujda, completed as standard-gauge route between Oran and Oujda in 1922, while Fes was reached in 1934.

600 mm ( 1 ft 11 + 5 8 in ) and 1,000 mm ( 3 ft 3 + 3 8 in ) gauge networks in Morocco