Train travel in Morocco

Morocco has a well-developed and well-maintained railway network, but it does not reach the southern parts of the country. Train travel in Morocco is relatively inexpensive and comfortable. The Moroccan government invests a lot of money in the development of the railway network and renovation of stations. Railway stations are clean and well-kept. The rolling stock is being replaced.

Last updated: 28.02.2024

The first narrow gauge railway in Morocco was a 600 mm short private railway connected the palace of the Sultan of Morocco with his Jardin l’Agdal de Meknes. The railway was presented by Belgian Government.

In 1907 the railway line connected the Port of Casablanca to a quarry in Roches Noires was built by the French Compagnie Marocaine. The 600 mm gauge line was probably destroyed by tribesmen of the Shawiya.

The first public railway line in Morocco was opened in 1908. The railway line between Casablanca and Berrechid, a distance of 83 kilometers was built to 500 mm gauge, later was regauged.

Over the next twenty years, many narrow-gauge lines were built in Morocco. In 1935, French Morocco had a narrow gauge railway network with a total length of more than 1700 kilometres.

In 1920s the standard-gauge railway line Marrakech – Casablanca – Kenitra – Fes – Oujda (Chemins de fer strategiques du Maroc) was built (948 km).

Casablanca to Marrakech railway line was completed in 1936.

In 1982 the railway line from Nouaceur to Jorf Lasfar was put into operation for freight transport.

In 1992 railway line to Mohammed V International Airport was opened.

On 26 November 2018, the first high-speed rail line linking Casablanca and Tangier was launched.

Train travel in Morocco
Al-Boraq train (Photo: David Jones, CC-BY-SA, flickr.com)

Train travel in Morocco – domestic trains

Railways in Morocco are in good condition. Trains in Morocco connect almost all major cities (excerpt Agadir). The authorities plan to expand high-speed rail to Agadir and build new railway lines in various parts of the country. Regular passenger trains in Morocco are operated by Office National des Chemins de Fer du Maroc (ONCF).

Useful websites:

ONCF  – official website (it may works or not)
ONCF Voyages – online shop
Railway map of Morocco (2018)(Wikimedia)

Train tickets can also be purchased on site at ticket offices or ticket machines.

– railway stations are clean, well-kept and safe. The staff most often speaks French, but sometimes you can communicate in English.
– second class seat reservation is included with the ticket.
– the Moroccan railway has its own network of bus connections, and the tariff of the largest Moroccan bus operators is integrated with the railway tariff.
– there are no problems with photographing stations and trains but it may change.
– ticket machines do not accept credit cards from many countries, passengers need to pay in cash.
– if you want to travel in 2nd class carriages, you should purchase tickets at least one day in advance.

Trains in Morocco
Al-Atlas train (Photo: David Gubler, CC-BY-SA, Wikimedia Commons)

Categories of the trains in Morocco

TNR – fast trains running between Rabat and Casablanca and Kenitra. The full name is “Train Navette Rapide”. The line operates classic wagon trains and air-conditioned double-deck multiple units.

Trains Grandes Lignes – fast trains. Classic wagon trains with first and second class carriages. Some of the carriages are air-conditioned, mainly with compartments.

Al-Atlas – a category for the fast trains run from Casablanca to Tanger and Marrakech

Al-Boraq – a double-decker TGV train runs from Tangier to Casablanca on the high-speed railway line. First class, second class and bar carriage.

Long-distance trains in Morocco run on the following routes:

Casablanca – Fes
Tanger – Tanger port
Casablanca – Oujda
Casablanca – Khouribga
Fes – Marrakech
Casablanca – Tanger

Many long distance trains are comprised of diesel or electric locomotive and passenger carriages – 1st and 2nd classes are available, standard of the carriages is the same as in Balkan countries, for example Romania, Bulgaria and Croatia. 2nd class carriages have 8-seat compartments, 1st class carriages 6-seat compartments. There are also open coaches that used to run on Corail night trains in France.

There are also electric multiple units on some routes, similar to those operating in France.

Railways in Morocco
Fast train with carriages (Photo: Christof Hofbauer, CC-BY-SA, Wikimedia Commons)
Moroccan train
Interior of the 2nd class coach (Photo: Hamza Izourane, CC-BY-SA, Wikimedia Commons)

Train travel in Morocco – night trains

There are several night trains in Morocco. Overnight trains in Morocco run from north to south and west to east of the country. Moroccan Railways currently runs the following night trains:

Casablanca – Oujda
Marrakesh – Tanger
Tanger – Oujda
Casablanca – Nador

Passengers can choose between couchette cars with 4-bunk compartments and sleeping cars with 2-bed compartments. On some routes 1st class sleeping cars with single compartments are available. Ticket price includes a hygiene kit, a small bottle of mineral water and a simple breakfast.

Night trains are very popular, so booking in advance is highly recommended. The timetable and prices are available in the connection search engine on the ONCF’s official website.

Casablanca train
Overnight train in Morocco – sleeping car interior (Photo: ONCF)

Train travel in Morocco – Train du desert

Several times a year passengers can ride a famous tourist train from Oujda to the town of Bouarfa, which was formerly an industrial center known for the mining of manganese ore in the area. The line was built in the late 1920s and was intended for transport soldiers and minerals. The train route is over 300 kilometers long.

Train covered the entire route usually in approximately 12 hours, but due to sandstorms and the need to remove sand from the tracks with shovels, the time of the journey may be longer.

After the closure of the mines near Bouarfa, the line was unused for a long time, but in recent years it was rediscovered, because the Train du desert appeared in one of the scenes of the movie “Spectre” (2015) about the adventures of James Bond, and some of the film was shot in the area, which resulted in increased interest in the train among wealthy tourists.

The train is composed of a diesel locomotive and ONCF carriages – there are first-class air-conditioned carriages, as well as carriages from the 1960s, including a bar car and a lounge car. In most carriages, windows in compartments and corridors can be open. The maximum speed on the route is 50 km/h, for most of the journey the train does not exceed 30 km/h.

On most of the route you can admire the desert landscape and abandoned stations.

The train runs only a few times a year, 5 or 6 at most. The trips are organized by the Trainmaroc travel agency in cooperation with the Moroccan Railways ONCF.

Morocco Train du desert
Train du desert (Photo: ONCF)

Train travel in Morocco – international trains

There are no international trains from Morocco to adjacent countries.

There is a railway link with Algeria, but route has been closed since the 1990s.

There are plans to build a new railway line from Marrakech to El Aaiun in Western Sahara. Morocco claims Western Sahara as part of Morocco and consider proposed routes as national routes.

Related articles:

Railways in Africa by country

Tanger train
View from the train in Morocco (Photo: Train Age7505, dreamstime.com)