Skip to main content
Morocco by Train: ONCF, Al Boraq and the Rail Network

Practical · Getting around

Morocco by Train: ONCF, Al Boraq and the Rail Network

Morocco has one of Africa's best rail networks, run by the national operator ONCF — including Al Boraq, the continent's first high-speed line, linking Tangier, Kenitra, Rabat and Casablanca. Trains are comfortable, punctual and inexpensive, but many headline destinations have no station at all. This guide covers the routes, classes, how to book and what the train can't reach.

Updated June 20265 min readPractical

Morocco has one of Africa's best rail networks, run by the national operator ONCF — including Al Boraq, the continent's first high-speed line, linking Tangier, Kenitra, Rabat and Casablanca. Trains are comfortable, punctual and inexpensive, but many headline destinations have no station at all. This guide covers the routes, classes, how to book and what the train can't reach.

In this guide
  1. 01How the network works
  2. 02Al Boraq: Africa's first high-speed rail
  3. 03The conventional lines
  4. 04Classes, comfort and tickets
  5. 05What the train does NOT reach
  6. 06Frequently asked

How the network works

Morocco's trains are operated by ONCF (Office National des Chemins de Fer), the national rail company. The network is concentrated in the north and along the Atlantic coast, connecting the major imperial and economic cities in a rough Y-shape, with Casablanca and the junction town of Sidi Kacem at its heart.

There are two kinds of train. Al Boraq is the high-speed service (LGV — Ligne à Grande Vitesse); the rest of the network is served by conventional intercity trains branded as Al Atlas. Between them they link Tangier, Kenitra, Rabat, Casablanca, Fes, Meknes and Marrakech, with branches to towns such as Oujda in the east and El Jadida and Safi on the coast.

  • Operator: ONCF, the national railway.
  • High-speed: Al Boraq on the Tangier–Kenitra–Rabat–Casablanca corridor.
  • Conventional: Al Atlas intercity trains across the rest of the network.
  • Hubs: Casablanca (Casa-Voyageurs), Rabat-Agdal and the Sidi Kacem junction.

Al Boraq: Africa's first high-speed rail

Al Boraq opened in 2018 and was the first high-speed rail line in Africa. It runs along a dedicated line between Tangier and Kenitra at speeds of up to around 320 km/h, then continues on upgraded conventional track through Rabat to Casablanca. The full Tangier–Casablanca journey, which once took close to five hours, now takes a little over two.

The trains are modern double-deck sets with airline-style seating, power sockets and a café car. Al Boraq has its own first and second class and reserved seating, so on this line you buy a ticket for a specific train and seat. Tangier and Kenitra have purpose-built high-speed stations; in Rabat and Casablanca the high-speed trains use the existing central stations.

The conventional lines

Beyond the high-speed corridor, ONCF's Al Atlas intercity trains cover the classic routes. From Casablanca, lines run south-east to Marrakech and east through Sidi Kacem to Meknes, Fes and on to Oujda near the Algerian border. Rabat, Casablanca, Kenitra and Tangier all sit on these routes too, so it is easy to combine a high-speed and a conventional leg on one trip.

These trains are comfortable and generally punctual, if not as fast as Al Boraq. The Marrakech line is especially useful for visitors, linking the city to Casablanca and the airport corridor; Fes and Meknes are the gateway to the imperial north. A separate fleet of double-deck commuter trains (Train Navette Rapide, or TNR) shuttles frequently between Casablanca, Rabat and Kenitra.

  • Casablanca ↔ Marrakech — the main southern line.
  • Casablanca/Rabat ↔ Meknes ↔ Fes ↔ Oujda — the eastern line.
  • Frequent commuter shuttles (TNR) Casablanca–Rabat–Kenitra.

Classes, comfort and tickets

Conventional Al Atlas trains have first and second class. First class is more spacious with reserved seats in compartments or open saloons; second class is cheaper and can be busy at peak times and on weekends, where seats may not be reserved. For long daytime legs — Marrakech to Fes, say — first class with a reserved seat is worth the modest extra cost.

You can buy tickets at any station ticket window, from machines, or in advance through the ONCF website and the official ONCF app, which is the easiest way for visitors to check timetables and reserve seats. Fares are low by European standards. For Al Boraq and for first class on busy routes it is wise to book ahead, especially around Moroccan public holidays and summer weekends.

  • Two classes on conventional trains; reserved seating on Al Boraq.
  • Buy at station windows, machines, the ONCF website or the ONCF app.
  • Fares are inexpensive; book Al Boraq and peak first class in advance.
  • Keep your ticket — it is checked on board and sometimes at the platform.

What the train does NOT reach

This is the most important thing to understand before planning a rail trip. Many of Morocco's signature destinations have no railway at all. The train will not take you to Chefchaouen, to Essaouira on the Atlantic, into the Sahara at Merzouga or M'Hamid, to Ouarzazate and the kasbah country, or up into the High Atlas. There is also no train to Agadir.

For these places you rely on road transport. The main intercity coach companies, CTM and Supratours (the latter run by ONCF itself), connect the rail network to towns the trains don't reach — Supratours coaches from Marrakech to Essaouira, for example, or onward services toward the desert. Many visitors take the train for the long city-to-city hops and switch to a private transfer or driver-guide for the mountains and the Sahara, where having your own vehicle unlocks the scenery and the stops along the way.

  • No train to: Chefchaouen, Essaouira, Merzouga/M'Hamid, Ouarzazate, Agadir, the High Atlas.
  • Coaches: CTM and Supratours fill many of the gaps.
  • For the desert and mountains, a private driver or 4x4 transfer is the usual choice.

Frequently asked

Is there a high-speed train in Morocco?

Yes. Al Boraq, opened in 2018, was Africa's first high-speed rail line. It runs between Tangier and Casablanca via Kenitra and Rabat, reaching up to around 320 km/h on its dedicated section and cutting the Tangier–Casablanca trip to a little over two hours.

Can you take a train to the Sahara or Chefchaouen?

No. There is no railway to the Sahara (Merzouga or M'Hamid), to Chefchaouen, to Essaouira, to Ouarzazate or to Agadir. The rail network covers the northern cities and the Atlantic corridor; for everywhere else you use coaches (CTM or Supratours) or a private transfer.

How do you book Morocco train tickets?

Buy them at any station ticket window or machine, or in advance on the ONCF website or the official ONCF app, which also shows live timetables. Fares are inexpensive, but it is worth reserving Al Boraq and first-class seats ahead on busy routes and around public holidays.

Is first or second class better on Moroccan trains?

First class gives you a reserved, more spacious seat and is the better choice for long daytime legs and busy weekends, for only a modest extra cost. Second class is cheaper and perfectly fine for shorter hops, though it can be crowded and seats may not be reserved.

Planning a trip?

Let a Marrakech atelier handle the details.

Tell us your dates and style and we'll send a written itinerary and a transparent quote within 24 hours.

Request an itinerary
or explore

Keep reading