Marrakech to Fes by Car or Train: Routes, Times and Stops

29 November 2026 · 6 min read · By Car Hire Marrakech

Bab Bou Jeloud, the blue-tiled gate into the medina of Fes

The simplest way from Marrakech to Fes is the direct ONCF train, which takes about 6 hours 30 with no change. By car it is about 530 km on the motorway via Casablanca and Rabat, roughly 6 hours of driving plus tolls and about 500 MAD of diesel. The inland route through Beni Mellal and the Middle Atlas is shorter but slower, at 7 to 8 hours, and far more scenic. Many travellers instead drive a 3 to 4 day loop through the Sahara.

Key facts
Direct trainAbout 6 h 30, no change; 2026 fares roughly 220 to 420 MAD[1]
Motorway driveAbout 530 km via Casablanca and Rabat (A7 then A2[3]), about 6 h
Fuel (economy diesel)About 480 to 520 MAD one way at Nov 2026 prices[4]
Middle Atlas routeAbout 480 km via Beni Mellal and Ifrane, 7 to 8 h
Desert loop900 to 1,000 km via Merzouga, 3 to 4 days
Parking in FesGuarded car parks outside the medina walls

Marrakech to Fes: car or train?

The train is the simple option. ONCF classic trains run the Marrakech–Casablanca–Rabat–Meknes–Fes line,[2] with direct services through the day taking about 6 hours 30; journey planners list fares of roughly 220 to 420 MAD in 2026, depending on class and how early you book.[1] Check current times on the ONCF app or website, as our guide to buying ONCF tickets explains. The high-speed line does not reach Marrakech yet and is not due until 2029.[6] First class is worth considering for such a long ride, as it guarantees a seat. You arrive at Fes station in the new town, a short taxi ride from the medina. Coaches also run the route (CTM or Supratours), and there are flights, covered in domestic flights from Marrakech.

The car is quicker on the motorway, at about 6 hours, and it opens up routes the train never sees: the Middle Atlas, the cedar forests and, if you have more days, the desert. It also lets you visit Meknes or the Roman ruins of Volubilis on the way. For two or more people with luggage, it is usually the better value too.

Coming from Fes to Marrakech, the same choices apply in reverse. The motorway is the safe bet for a single day, while the Middle Atlas road makes a good two-day return with a night in Beni Mellal and a stop at the Ouzoud falls. Wherever you start, avoid arriving in either medina after dark: finding a car park and your riad is far easier in daylight.

The motorway route via Casablanca and Rabat

Take the A7 north from Marrakech towards Casablanca, follow the motorway around Casablanca towards Rabat, then join the A2 east via Khemisset and Meknes to Fes.[3] The total is about 530 km, all on dual carriageway, and takes roughly 6 hours of driving at the 120 km/h limit. With fuel and lunch stops, plan on 7 hours.

Tolls are paid at the exit booths and add up over this distance; the Marrakech–Casablanca section alone is under 100 MAD for a car, so budget roughly 200 MAD in total and carry small notes. That total is our estimate, so check the ADM app before you set off. Service areas are regular, but traffic can be heavy around Casablanca and Rabat at rush hour and on Friday and Sunday afternoons. Try to pass both cities mid-morning or early afternoon.

This is the right route if you simply need to get to Fes, if the weather in the mountains is poor or if you want a stop in Rabat. For an economy diesel car, fuel for the one-way trip is roughly 480 to 520 MAD, with diesel at about 16.2 to 16.8 MAD a litre in mid-November 2026.[4] Our page on fuel, tolls and parking in Morocco explains how tolls and pumps work.

Two worthwhile stops lie close to this route. Rabat, the capital, has the Kasbah of the Udayas and the Hassan Tower, both a short drive from the motorway with parking nearby. Just before Fes, a detour north from Meknes leads to Volubilis, the best-preserved Roman site in Morocco, and the holy town of Moulay Idriss. Allow an extra half day for either.

Planning this trip? Check the cars for your dates.Free cancellation • No credit card required • Pay on arrival

Get quote

The inland route via Beni Mellal and the Middle Atlas

The N8 national road runs north-east from Marrakech through El Kelaa des Sraghna to Beni Mellal, then climbs along the foot of the Middle Atlas to Khenifra, Azrou and Ifrane before dropping down to Fes. It is about 480 km on two-lane roads and takes around 7 to 8 hours of driving, so most people split it with a night in Beni Mellal or Ifrane.

Highlights along the way include the Ouzoud waterfalls, a detour of about an hour from the Beni Mellal side, and the cedar forest near Azrou, where Barbary macaques gather by the roadside. Please do not feed them. Ifrane, at about 1,650 m, is a tidy alpine-style town with chalets, lakes and cafés, and a pleasant contrast to the medinas.

In winter, from December to February, the Middle Atlas can see snow and ice, and roads near Ifrane and Azrou are occasionally closed for a few hours. The UK government notes that mountain roads can be especially hazardous in poor weather.[5] Check the forecast, drive gently and switch to the motorway if conditions look bad. Our guide to Atlas mountain driving in winter has more.

The desert loop: Marrakech to Fes via Merzouga

If you have 3 or 4 days, the classic road trip goes the long way round. Cross the High Atlas on the Tizi n'Tichka to Aït Ben Haddou and Ouarzazate, follow the valley of the kasbahs to the Dadès and Todra gorges, spend a night in the dunes at Merzouga, then head north via Er Rachidia, the Ziz valley and Midelt, through the Middle Atlas to Fes.

It is roughly 900 to 1,000 km in total, all on paved roads. Our guides to the Tizi n'Tichka and Aït Ben Haddou and the Marrakech to Merzouga drive cover the first part in detail, and our Morocco road trip itinerary puts the whole loop together.

Arriving in Fes: driving and parking

The Fes medina, Fes el-Bali, is one of the largest car-free old towns in the world, and its lanes are far too narrow to drive. Park outside the walls and walk in. The guarded car parks near Bab Bou Jeloud, around Batha and near Bab Guissa on the north side are the usual choices, and many riads will tell you which one is closest.

Ask your host to send someone to meet you at the car park. The lanes are a maze, and an arranged guide avoids the self-appointed ones who offer to lead you and then ask for money. Pay the attendant the overnight rate agreed in advance and leave nothing on view in the car.

The new town, the Ville Nouvelle, is easy to drive around, with wide avenues and street parking watched by attendants.

Driving to Fes with a car from Marrakech

Our cars are delivered and returned in Marrakech, Essaouira and Agadir, so a trip to Fes is a round trip. If you want to finish in Fes, read our guide to one-way car hire in Morocco. That suits a loop well: go one way through the Middle Atlas or the desert and come back on the motorway, without ever covering the same road twice.

With insurance, unlimited mileage and a second driver included, long distances cost nothing extra in hire, and you can share the driving. A Dacia Duster or Kia Sportage is comfortable on mountain roads and for a desert loop, and the VW T-Roc adds an automatic gearbox. For motorway-only trips, a Dacia Logan automatic from €28 a day is perfectly adequate. See our car hire in Morocco page and get a quote for your dates.

Frequently asked questions

How long is the drive from Marrakech to Fes?
About 6 hours for roughly 530 km on the motorway via Casablanca and Rabat. The inland route through Beni Mellal and Ifrane takes 7 to 8 hours of driving.
Is there a direct train from Marrakech to Fes?
Yes. ONCF runs direct trains through the day, taking about 6 hours 30. Check the current timetable on the ONCF app or website.
What is the most scenic route from Marrakech to Fes?
The N8 through Beni Mellal, Azrou and Ifrane crosses the Middle Atlas and its cedar forests. With more time, the loop via the Dadès gorges and Merzouga is the most memorable.
Where do I park in Fes?
Outside the medina walls, in the guarded car parks near Bab Bou Jeloud, Batha or Bab Guissa. The medina itself cannot be driven.
Can I drive from Marrakech to Fes in one day?
Yes, on the motorway it is a long but easy day of about 6 hours at the wheel. On the mountain route, a night in Beni Mellal or Ifrane makes the trip far more enjoyable.

See the price for your dates in seconds.Free cancellation • No credit card required • Pay on arrival

Get quote

Sources

  1. Train from Marrakesh to Fes, Rome2rio (accessed 2026-11-21)
  2. Train travel in Morocco, The Man in Seat 61 (accessed 2026-11-21)
  3. Autoroutes of Morocco, Wikipedia (accessed 2026-11-21)
  4. Carburants: le gasoil et l'essence repartent à la baisse ce lundi 16 novembre, Finances News Hebdo (accessed 2026-11-21)
  5. Morocco travel advice: safety and security, UK Foreign, Commonwealth & Development Office (accessed 2026-11-21)
  6. LGV Kénitra-Marrakech: le chantier atteint 30% d'avancement, Le360 (accessed 2026-11-21)

Related guides