Can You Take a Train From Marrakech to Fes?
Yes — ONCF runs a direct train between Marrakech and Fes, and for a straightforward city-to-city hop it does the job well. Here's what the ride is actually like, and why our own route between the two goes a different way.
If Marrakech and Fes are the only two stops on your list, the train is a genuinely good option. If you're open to what's between them, there's a more interesting way to make the trip.
The train itself — schedule, duration, comfort
ONCF runs several direct trains a day between Marrakech and Fes, and the trip takes roughly seven to eight hours depending on the service. That's longer than flying, obviously, but it's a comfortable, scenic ride through the Moroccan countryside, with reclining seats and a dining car on most trains. First class gets you a quieter, less crowded carriage, and it's worth the small price difference if you're doing the full distance. Booking through ONCF's website in advance is reliable and lets you pick your seat, though tickets are also sold at the station same-day if the train isn't sold out.
What the train route passes — and what it skips
The rail line between Marrakech and Fes runs through the middle of the country, past agricultural plains and smaller towns, but it doesn't touch the Atlas Mountains, the Dades or Todra gorges, Ait Ben Haddou, or the Sahara. Those are all south and east of the direct line, which is why our own Marrakech-to-Fes tours loop through the desert instead of running the straight shot — the train covers the distance, but it skips almost everything people actually come to Morocco to see along the way. If your time is limited and the destinations matter more than the journey, the train makes sense.
Station logistics at both ends
Marrakech's train station is a few kilometers from the medina, easily reached by petit taxi, and Fes's station is a similar short ride from the old city. Neither station is walkable from where most travelers stay, so budget a taxi at both ends. Luggage storage is limited, and the stations get busy around departure times for the popular morning and midday trains, so arriving twenty to thirty minutes early is worth it if you haven't already bought your ticket online.
When the desert route makes more sense
If you've got three or more days between Marrakech and Fes, going by private vehicle through Ait Ben Haddou, the Dades Gorge, and a night in the Sahara turns an otherwise unremarkable transit day into the core of the trip. It's the same two endpoints, but everything in between — the kasbahs, the gorges, the dunes at sunset — only exists on the road route. The train is faster and cheaper for a pure A-to-B transfer; the desert route is how you actually see the country between them.
Related tours

4-Day Marrakech to Fes Desert Tour via the Sahara
A private, one-way route from Marrakech to Fes over the Atlas mountains and into the Sahara — real passes, real kasbahs, and a night under the dunes at Merzouga.
View Details
3-Day Marrakech to Fes Desert Tour via Merzouga
A one-way desert crossing from Marrakech to Fes — kasbahs and canyons on the way down, a night in the Merzouga dunes, and cedar forest on the way in.
View DetailsPlanning where to start? See tours from Marrakech, tours from Fes.
Related reading: Getting Around Morocco, Marrakech to Fes: How to Get There and What to See Along the Way.
Frequently asked questions
How long does the train from Marrakech to Fes take?
Around seven to eight hours depending on the specific service, run directly by ONCF.
Is first class worth it on this route?
For a ride this long, yes — it's a modest price difference for a quieter, less crowded carriage.
Does the train pass anything scenic along the way?
It runs through agricultural plains and towns, but it doesn't reach the Atlas Mountains, the gorges, Ait Ben Haddou, or the Sahara — all of which sit off the direct rail line.
Is booking through ONCF online reliable?
Yes, ONCF's own booking site is the standard way to reserve seats in advance, and it's generally reliable for this route.
Can I do Marrakech to Fes by train and still see the desert?
Not on the same transfer — the desert route and the direct rail line are genuinely different paths, so seeing both means choosing the road.
Is the train cheaper than a private driver for this route?
Per person, yes, if all you need is transport between the two cities with nothing in between.