Trains and Buses in Morocco
Does Morocco have a good train network from Marrakech?
For the northern corridor, yes — ONCF trains connect Marrakech to Casablanca (~2h30) and Rabat (~4h) comfortably and reliably, with Tangier (~7h) reachable via a change and the high-speed LGV from Casablanca. There's no rail line south or west of Marrakech, so Essaouira, Ouarzazate and Merzouga all rely on bus or private transfer instead.
Morocco’s national rail operator, ONCF, runs a genuinely good service — but only along a specific corridor. From Marrakech, that means Casablanca and Rabat are an easy, comfortable train ride away, while everywhere south and west of the city, including Essaouira, Ouarzazate and the desert towns, has no rail access at all and relies entirely on buses or private transfers. Knowing which category your route falls into early saves a lot of confused searching for train times that don’t exist.
| Where | ONCF rail: Marrakech-Casablanca-Rabat-Tangier corridor |
| Cost | Trains from ~90-250 MAD depending on route and class; buses 80-150 MAD typical |
| Time needed | Casablanca ~2h30; Rabat ~4h; Tangier ~7h via Casablanca |
| Getting there | Marrakech railway station, a short taxi ride from the medina |
| Best time | Trains run frequently throughout the day; book buses ahead in summer |
Where the train network actually goes
ONCF’s line from Marrakech runs north through Casablanca and on to Rabat, with a connection at Casablanca onto the LGV high-speed line toward Tangier. Marrakech to Casablanca takes roughly 2 hours 30 minutes on a direct service, comfortable and frequent enough that it’s genuinely the easiest way to reach Casablanca’s Mohammed V airport if that’s on your itinerary. Rabat adds another hour or so beyond Casablanca, at around 4 hours total from Marrakech. Tangier is the furthest point on this corridor, reachable in roughly 7 hours via the change at Casablanca onto the LGV.
What the network doesn’t cover matters just as much: there’s no train south of Marrakech and no line running toward the Atlantic coast at Essaouira. If your Morocco itinerary includes any of Essaouira, Ouarzazate, Zagora, Merzouga or the Draa Valley, plan on a bus, shared grand taxi, or private transfer for that leg regardless of how well the train serves the rest of your trip.
Supratours and CTM: the bus alternative
Supratours and CTM are Morocco’s two major intercity bus operators, both running extensive networks well beyond what the train reaches. Supratours is affiliated with ONCF and occasionally times its bus connections to link with train arrivals at stations like Marrakech, which can be useful for a multi-leg journey. CTM is Morocco’s older and largest independent operator, with a similarly broad network and comparable comfort and pricing. Neither is clearly better than the other across the board — it’s more useful to compare specific departure times and prices for your exact route than to pick a brand outright.
For the specific and heavily travelled Marrakech-Essaouira route, both operators run several daily departures at 80-100 MAD; see Marrakech to Essaouira for the full comparison against grand taxis and private transfers on that corridor.
Reaching Fes or Tangier from Marrakech
Fes sits outside the ONCF network’s Marrakech-facing corridor in the sense that there’s no direct line — the practical routes are a private transfer, an overnight or day bus, or training via Casablanca with a connection. A direct transfer from Marrakech to Fes is the simplest option if you’d rather avoid a multi-leg journey, running the distance in one sitting without a change.
A shared transfer from Marrakech to Fes via Casablanca and Rabat is the lower-cost version of the same route for travellers happy to share a vehicle. For the return leg, a one-way transfer from Fes back to Marrakech covers the same ground.
Casablanca as a connecting hub
Because Casablanca sits on both the rail corridor and most bus networks, it functions as the practical hub for onward travel anywhere further north — Rabat, Fes, Tangier, or Mohammed V airport for an international flight. A transfer covering both the Casablanca airport and city centre from Marrakech is useful if your trip ends with an international departure from Casablanca rather than Marrakech-Ménara, and a private transfer to Casablanca works well as a standalone city-to-city option if you’re skipping the train for comfort or timing reasons.
Buying tickets and practical tips
ONCF tickets can be bought at the station, online in advance, or through the ONCF app, and booking ahead is worth it for popular routes and busy travel dates, though same-day tickets are usually available outside peak periods. Bus tickets work similarly through Supratours and CTM’s own booking counters and websites. Both networks require identification at ticket purchase — carry your passport. First class on longer train routes is a modest upgrade that buys a reserved, quieter seat, worth it on the longer Tangier run and less essential on the shorter Casablanca hop.
Marrakech’s railway station
Marrakech’s ONCF station sits in Gueliz, a short petit taxi ride from most medina riads rather than a walkable distance for most visitors carrying luggage. It’s a modern, well-signed station with a café, a small waiting area and reasonably clear platform information, considerably easier to navigate than some of Morocco’s older stations further north. Arrive with 20-30 minutes of buffer for a domestic departure — it’s not a large station requiring the lead time an airport does, but Marrakech traffic on the way there is the more variable factor.
Comparing the train to driving or a private transfer
For the Casablanca and Rabat legs specifically, the train is genuinely hard to beat on comfort and reliability — no traffic, no parking, and a fixed schedule that doesn’t depend on road conditions. Where a private transfer or self-drive starts to compete is on routes the train doesn’t reach at all, or where a direct door-to-door connection saves a change, such as Marrakech to Fes without the Casablanca stopover. For the self-driving option specifically, driving in Morocco covers what a road trip on these same corridors actually involves, including toll costs and road quality.
Luggage and comfort on trains versus buses
ONCF trains offer more luggage space and legroom than most intercity buses, and moving between carriages is easy if you want to stretch your legs on a longer run like the Tangier route. Supratours and CTM buses store larger bags in a hold beneath the vehicle, which is fine for standard suitcases but worth keeping in mind if you’re travelling with awkward or fragile items best kept with you. Both networks run air-conditioned vehicles as standard, so summer heat isn’t a practical concern on either option, unlike a self-driven car without functioning air conditioning.
Planning a multi-city trip around the rail line
Because the ONCF corridor connects Marrakech, Casablanca, Rabat and eventually Tangier in a single line, it’s a genuinely convenient backbone for a trip that includes more than just Marrakech — stopping a night or two in Rabat on the way to Tangier, for instance, costs little extra planning beyond booking each leg separately. Where this approach runs into trouble is trying to fold in a rail-free destination like Essaouira or Ouarzazate into the same multi-city loop; those legs need a bus or private transfer bolted onto the plan rather than a seamless rail connection, so it’s worth mapping out where the gaps are before committing to a route.
When it’s worth combining train and car
Some visitors take the train for the long, straightforward Casablanca or Rabat leg, then pick up a rental car once they’re closer to the destination they actually want to explore by road, such as picking up a car in Fes to reach the Rif Mountains rather than driving the whole way from Marrakech. This hybrid approach uses the train for what it does best — a fast, relaxed long haul — and saves the driving for the shorter, more scenic stretches where having your own vehicle actually adds something.
Morocco’s train network is a genuine asset for the Marrakech-Casablanca-Rabat-Tangier corridor, and Supratours or CTM buses fill in everywhere else reliably enough that the absence of rail rarely becomes a real obstacle. For getting around within Marrakech itself once you’ve arrived by either method, see getting around Marrakech.
Transport passes and transfers on GetYourGuide
Verified deep-linked GetYourGuide tours. Book through these links and we earn a small commission at no cost to you.
Photo: our own image of the location, not the operator’s product photo.


