ONCF – Office National des Chemin de Fer




The ONCF (Office Nationale des Chemin de Fer – “National Bureau of Railways”) is the National Railway company of Morocco.

It operates an extensive 3600Km long 1435mm gauge railway network, 1300Km of wich electrified at 3000V DC, criscrossing the entire country. ONCF’s network, the most modern in Africa (and under most aspects even more modern than many european counterparts) is formed of a north-south main line from Tangier to Marrakesh via Casablanca and Rabat and another mainline that branches off the previous at Kentra and runs eastwards to the Algerian border at Oudja via Sidi Kacem and Fes, plus several secondary branchlines that connect the two inland mainlines to seaside cities or further inward inlands.


ONCF as an entity was created in 1963 by a government-mandated merge of the various railway companies then in operation, inherited from the french colonial rule (Morocco was a colony, officially a protectorate of France from 1912 to it’s independence in 1956): CFM (Chemin de Fer du Morocco, the largest network of the group), CMO (Chemin de Fer du Morocco Oriental – the Eastern Morocco Railways, a CFM subsidiary from wich ONCF inherited the eastern part of it’s network), the Tangier-Fes Railway (from wich it inherited the namesake Tangier-Fes Line and related branches) and the Mediterranean-Niger Railway, from wich it inherited the line to Bouafra, in the Sahara Desert. This latter one was the remnant of colonial-era project known as the “Trans-Saharian” railway, wich was planned (as the name of the company delcared) to connect the Mediterranean to France’s colonies in western africa (the current independent countries of Mali, Niger, Ivory Coast and so on).

The following decades saw ONCF proceed into the modernization of it’s inherited network, wich was already quite modern and partly electrified. The Casablanca-Rabat Line was double-tracked in 1984 and the line towards Tangier was electrified in 2010. In 2018, Morocco’s (and also Africa and the Arab World’s) first High-Speed service, “Al-Boraq” started between Tangier and Casablanca. Derived from the French TGV system (and built with french technical assistance), it covers the 323Km distance between the two cities in little over an hour, running at a maximium speed of 320Km/h over dedicated newly-built high-speed lines.


Currently, ONCF operates roughly equal amounts of both passenger and freight trains: the formers are divided into four rough categories, being the Al-Boraq high-speed services, conventional InterCity trains operated at 160Km/h with modern air-conditioned coaches, the TNR (“Train Navette Rapide”) services, 160Km/h regional services operated at a high 15 minute frequencies between major cities using comfortable electric multiple units, and various branchline local passenger services (operated with the same modern air-conditioned stock of InterCity trains).

The bulk of freight services is formed of long and heavy phosphate trains, up to 60 wagons in lenght, going from the inland mines to ports – a sizeable conventional freight service, managed by ONCF’s “Fret” division, also exists.


As most of the original railways in Morocco were built during the French colonial era, french influence is very strong in infrastructure design, signalling (wich is identical to the french SNCF one), operational procedures and rules and many others.

Rolling stock is also mostly imported from france and is thus similar (often nearly identical) to equivalent SNCF types, altough sizeable numbers of US-made diesel locomotives, Japanese-made electric locomotives (and formerly Polish-made ones as well) and Belgian and Italian-made electric multiple units are also in service.

ONCF itself is a pubblic company fully owned by the Moroccan Government via the Ministry of Equipment, Transport and Logistics.



Electric Locomotives