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.
Getting to and from the station
Whichever way you travel, the first and last stretch happen on Marrakech’s streets. Most riads sit inside the medina walls where cars cannot reach the door, so you will usually walk or be met at the nearest drop-off point, then continue by taxi. Marrakech taxi guide explains how petit taxis work, how to agree a fare, and what to expect at busy points such as the station forecourt. For a wider look at the options inside the city, getting around Marrakech covers walking, taxis and the rest.
If you land at Marrakech-Ménara and want to head straight onto a train or bus, the Marrakech airport transfer guide sets out how to reach the city first. Keep a little slack between a late flight and an onward departure: the sensible habit is to treat the airport, the city and the station as three separate steps rather than one smooth line.
Choosing between train, bus and transfer for your route
A quick way to decide is to ask whether your destination lies on the rail corridor. If it does, the train is the default. If it does not, the choice narrows to bus or transfer, and the deciding factors are group size, luggage and how much you value a fixed departure time.
- Casablanca and Rabat: train first. Casablanca from Marrakech covers what the city offers if you are stopping rather than just connecting.
- Fes: a long day whichever way you go. Marrakech vs Fes helps you judge whether the journey is worth it for your dates.
- Essaouira: bus or transfer only. The Essaouira day trip guide and the Essaouira destination page show what you are travelling for.
- Ouarzazate and the south: no rail, so plan a road leg. See the Ouarzazate day trip guide for how this direction is usually handled.
- Merzouga and the dunes: the distance is large and the road is the only way. Marrakech to Merzouga and booking a Sahara tour explain why most travellers fold transport into a tour rather than assembling buses themselves.
Using public transport on a budget
Trains and buses are among the cheapest ways to cover long distances in Morocco, and they suit travellers who want to keep daily costs down. The trade-off is time and flexibility: you fit your plans around fixed departures, and you handle the transfers at either end yourself. If cost is your main concern, the Marrakech budget guide puts transport in the context of everything else you will spend, so you can see where a private transfer is a reasonable splurge and where the bus is plenty.
A useful pattern is to mix modes. Take the train where it is clearly the best option, use buses for the rail-free legs, and book a transfer only for the one journey where a change of vehicle or a long wait would spoil the day. That keeps the total reasonable without turning every leg into a logistics exercise.
Safety, scams and common-sense habits
Stations and bus terminals are busy places, and like any transport hub they attract a few people who want to help with your bags for a fee or point you to a “better” ticket office. Buy tickets from the official counters, the operator’s own website or its app, and be polite but firm with anyone who steps in uninvited. Marrakech scams guide lists the usual tricks, and the Marrakech safety guide covers general precautions. Keep valuables close, keep your passport accessible but secure, and avoid leaving a bag unattended on a platform or in a bus aisle.
Fitting trains and buses into a longer plan
Public transport works best when your itinerary is built around it from the start rather than patched in later. A first-time visitor can read the Marrakech first-time guide to settle the shape of the trip, then use the transport options here to connect the pieces. If you want a ready-made route that already handles the long legs, the Marrakech Sahara 3 days itinerary and the Marrakech southern circuit show how road travel is normally built into a plan, while Marrakech in 7 days leaves room for a rail trip to the coast or north.
If you are weighing whether to organise everything yourself, guided tour vs independent lays out the trade-offs honestly. Independent travel by train and bus is very doable on the northern corridor, but the south rewards a little more organisation or a guided option.
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.


