Skip to content
Modern tramway crossing a bridge in Rabat, Morocco
Getting Around

Morocco by Train: ONCF Routes, Classes and Tickets

Morocco's trains are fast, cheap and air-conditioned, and they link every big city except the ones you cannot reach by rail at all. This guide covers the network, the high-speed Al Boraq, which class to buy and how to reserve.

Eddyafa Travel
Journal
In this article3 min read

The short answer

Take the train between Casablanca, Rabat, Tangier, Fes, Meknes, Oujda and Marrakech: it is the fastest comfortable way between them, and the stations are the safest public spaces in the country. Everything the train does not reach is a bus, a grand taxi or a private driver.

Book in the ONCF app or at the counter. Trains sell out on Fridays and during Eid, and the popular evening departures go first.

  • Second class for anything under three hours — air-conditioned and usually half the price of first.
  • First class earns its keep on the Casablanca–Marrakech run.
  • No rail to Essaouira, Agadir, the Sahara or the High Atlas villages — plan a bus or a driver for those.

The network: where the rails run

ONCF runs a modern, double-track network along the Atlantic corridor and inland to the imperial cities. The main line chains Tangier, Kenitra, Rabat, Casablanca, Marrakech; the eastern branch runs Casablanca–Rabat–Khenifra–Oujda, with Fes and Meknes on the north-eastern arm.

The trains are calm, the café cars work, and the stations are among the safest places you will wait in Morocco. Distances that look short on the map still take time: the country is bigger than its coastline suggests.

A train on railway tracks in Tangier, Morocco

Al Boraq, the high-speed line

The Tanger–Casablanca Al Boraq line is genuine high speed at 320 km/h, cutting the coast run to about two hours, with the extension towards Marrakech running since 2024. It connects Tangier, Rabat and Casablanca in comfort — the single biggest time-saver in the country.

Away from that line, trains cruise at 100–160 km/h on rolling stock that would not embarrass a European operator. Reserve ahead in the ONCF app; the high-speed seats are the first to go.

Buying tickets and choosing a class

Buy second class for anything under three hours: it is air-conditioned, usually half the price, and full of Moroccans doing the same journey. First class earns its keep on Casablanca–Marrakech, where the extra space matters after a long flight.

The ONCF app sells every ticket on the network; so do station counters and the machines. Trains sell out on Fridays and during Eid — book a day ahead in those windows, and keep the ticket until a conductor has seen it.

Where the train stops: Supratours and the last hour

There is no train to Essaouira, Agadir, the Sahara or the High Atlas villages. Supratours, the ONCF's own bus arm, plugs exactly these gaps and sells the connection as one ticket — Marrakech–Essaouira or Fes–Merzouga without a second counter.

Beyond Supratours, CTM and the smaller companies cover the secondary roads, and the grand taxis fill whatever is left. The rule stays the same: the train gets you across the country, the last hour is always something else.

Tourist transport minibus in Morocco

Stations, safety and the practical details

Stations are staffed, lit and busy — the safest public spaces in the country, and the natural place to wait. Arrive twenty minutes early for a reserved seat, keep luggage in sight, and use the station ATMs before the small-town ones run dry.

Journeys are calm and the café cars work, so a bottle of water is a choice rather than a necessity. Night trains exist on the long routes but the daylight departures are the ones to build an itinerary around.

Passengers at a tram station in Rabat, Morocco

Who the train suits, and who should drive

The train suits city-to-city trips, solo travellers, and anyone who would rather read than watch the road. With a family and one base, it beats a rental for the simple reason that nobody navigates.

It suits you less with a fixed desert deadline, a surfboard, or young children needing a mid-journey stop. For those, renting or hiring a driver is the honest answer, and getting around Morocco compares every option side by side.

Scenic view across Morocco

Begin your adventure

Your dream Morocco trip starts here

Tell us where you want to go, when, and at what pace, we'll craft a tailor-made itinerary with private transport, hand-picked riads and local guides.