Quick answer: Marrakech and Fes are about 530 km apart. The train (via Casablanca) takes around 7 hours and is the cheapest comfortable option. A private driver through the Middle Atlas takes 7–8 hours with stops at Ifrane and the cedar forest. The most popular way, though, is a 3-day desert tour via the Merzouga dunes, which turns the transfer into the highlight of the trip.
The three routes compared
| Option | Time | Highlights |
|---|---|---|
| Train (ONCF, change in Casablanca) | About 7 h | Cheap, comfortable, no stops |
| Private driver via Middle Atlas | 7–8 h | Beni Mellal, Ifrane, cedar forest, monkeys |
| Desert route via Merzouga | 3 days | Ait Ben Haddou, Dades, Sahara camp, Ziz valley |
| CTM / Supratours bus | 8–9 h | Cheapest |
By train
There is no direct line: you take the train from Marrakech to Casablanca and then a connection to Fes, often in the same ticket. Check times on the official ONCF website and book first class on busy days; the difference in price is small and seats are reserved.

Tours related to this guide
- 3-Day Desert Tour from Marrakech to Fes via Merzouga
- 7-Day Tour: Marrakech, Desert, Fes & Chefchaouen
- Private Guided Tour of Fes
Want a trip built around your dates? Ask for a free tailor-made itinerary →
By road through the Middle Atlas
The direct road crosses the Tadla plain to Beni Mellal and climbs into the Middle Atlas. Good stops: the Ouzoud waterfalls (a detour of about 1 hour), Ifrane, nicknamed “the Switzerland of Morocco” for its chalets and clean streets, and the cedar forest near Azrou, home to wild Barbary macaques. With a private driver, this is a full day with a lot to see.
Via the Sahara: the classic choice
Most travellers who have three days turn the transfer into a desert adventure: day 1 over the Tizi n’Tichka pass to Ait Ben Haddou and the Dades valley; day 2 through the Todra gorge to the Merzouga dunes and a night in a camp; day 3 along the Ziz valley and through the Middle Atlas to Fes. This is the route of our 3-day desert tour to Fes.

When you arrive in Fes
Plan at least two nights in Fes. The medina of Fes el-Bali is one of the largest car-free urban areas in the world and is easy to get lost in: a licensed guide for the first half-day helps enormously. Our guide to things to do in Fes lists the highlights, and you can add a day trip to Volubilis and Meknes.
Frequently asked questions
How long does it take to get from Marrakech to Fes?
About 7 hours by train with a change in Casablanca, 7–8 hours by car through the Middle Atlas, or 3 days if you go via the Sahara desert.
Is there a direct train from Marrakech to Fes?
Not usually. Most journeys require a change in Casablanca, but you can buy one ticket for the whole trip from ONCF.
What is the best way to travel from Marrakech to Fes?
If you have 3 days, go via the Sahara at Merzouga. If you have one day, take the train for comfort or a private driver if you want stops in the Middle Atlas.
Can I fly from Marrakech to Fes?
Domestic flights between the two cities are rare and often require a connection. Once you include airport time, the train is usually as fast.
Keep reading
Written by the Todo Marruecos Tours team, local guides and drivers based in Morocco. Last updated: November 2026.

