Map of Morocco with the routes from Tangier to Marrakech and the title Tangier to Marrakech
Morocco Travel Tips

Tangier to Marrakech: Train, Driving, Distance and Three Routes

Tangier to Marrakech is about 575 km (357 miles) by motorway, running down the Atlantic coast through Rabat and Casablanca. The train takes around 5 hours with one change, the drive 6 to 7 hours without stops, and a direct flight a little over an hour. Between the two cities, though, lie Chefchaouen, Fes and the Merzouga dunes, so the real question is less how to get there than which route to take.

In short

The easiest way to get from Tangier to Marrakech is by train: the Al Boraq high-speed train to Casablanca, then an Al Atlas train to Marrakech, about 5 hours in all. Driving is roughly 575 km (357 mi) of toll motorway. With a week, the route through Chefchaouen and the imperial cities covers about 950 km; with nine days, a detour via the Merzouga desert and the High Atlas comes to around 1,800 km.

Distance between Tangier and Marrakech 

As the crow flies, Tangier and Marrakech are about 500 km (310 mi) apart. By road it is closer to 575 km (357 mi), because the fastest way follows the Atlantic coast to Rabat and Casablanca before turning inland. The railway uses the same corridor, which is why the train and the car end up covering almost the same ground.

The table compares the four ways of making the trip. Times are indicative and depend on timetables, traffic leaving the cities and how often you stop.

Tangier to Marrakech at a glance
OptionApproximate timeBest forKeep in mind
Train (Al Boraq + Al Atlas)About 5 hCity centre to city centre, no drivingOne change in Casablanca
Car on the motorway6 h 30 to 7 h at the wheelFreedom to stop in Rabat or CasablancaTolls and Casablanca traffic
Direct flightA little over 1 h in the airShortest journey on paperAirport transfers, security, seasonal schedules
Bus8 h 30 to 9 h 30Tight budgetsThe slowest option

Train from Tangier to Marrakech 

There is no direct high-speed train from Tangier to Marrakech yet. The Al Boraq line, opened in November 2018, links Tangier with Kenitra, Rabat and Casablanca, and the national rail operator ONCF announced a journey time of 2 h 10 between Tangier and Casablanca. From Casa-Voyageurs station you change to a classic Al Atlas train for Marrakech, which takes about 2 h 40 to 3 h depending on the departure.

With the connection, the whole train journey from Tangier to Marrakech takes about 5 hours. Tickets are sold on ONCF’s official website and app or at the station. Al Boraq seats are reserved, so book ahead for weekends and holidays.

Al Boraq high-speed train at Tanger Ville station
Al Boraq leaves from Tanger Ville and runs to Casablanca; the last leg to Marrakech is on a classic train.
Al Boraq high-speed train at Tanger Ville station

Overnight train. ONCF has run a direct night train between Tangier and Marrakech in recent years. Its timetable and onboard services change, so check ONCF’s official website for your date before you plan around it.

When will the high-speed line reach Marrakech?

Work on the new Kenitra to Marrakech high-speed line began on 24 April 2025. It adds about 430 km (267 mi) to the existing line, and ONCF expects Tangier to Marrakech to take about 2 h 40 without a change once it opens. In May 2026 the Moroccan government put the opening at the end of 2029. Until then, every train journey goes via Casablanca.

Driving from Tangier to Marrakech 

The quickest drive strings together three motorway sections: Tangier to Rabat along the coast, Rabat to Casablanca, and Casablanca to Marrakech. That is about 575 km (357 mi) and 6 h 30 to 7 h of driving without breaks. The motorways are run by the state company Autoroutes du Maroc (ADM); they are tolled, and you pay in cash at the booths or with the Jawaz electronic tag. The general speed limit on motorways is 120 km/h (about 75 mph).

Many travellers drive down through Spain and cross by ferry. Boats from Algeciras dock at Tanger Med, about 50 km (31 mi) east of the city, while ferries from Tarifa arrive at Tanger Ville port in the centre. Tanger Med has its own motorway link towards Tangier and the south.

  • Leave early to get through Casablanca before rush hour; the urban stretch is the slowest part of the drive.
  • Break the trip in Rabat, almost exactly halfway, about 245 km (152 mi) from Tangier.
  • Avoid driving at night on secondary roads, especially in the mountains.
  • If you bring your own car, carry its papers and check that your insurance covers Morocco before you sail.
Mountain road through the Rif towards Chefchaouen
If you are not in a hurry, the Rif road to Chefchaouen changes the whole feel of the trip.
Mountain road through the Rif towards Chefchaouen

Flying or taking the bus 

Direct flights between Tangier Ibn Battouta and Marrakech Menara take about 1 h 10 to 1 h 15. Airlines and frequencies change with the season, and once you add transfers and security checks the time saved over the train is smaller than it looks. If you land in Marrakech, our Marrakech airport guide explains how to reach the medina.

Long-distance buses (CTM is the best-known company) are the cheapest and the slowest option: direct services take 8 h 30 to 9 h 30. They make sense on a tight budget or if you want to travel overnight.

Tangier to Marrakech itinerary: three routes with stops 

Most people planning a Tangier to Marrakech road trip don’t want to do it in one go. Northern and southern Morocco feel like different countries, and the map shows the three usual ways of linking them: straight down the coast, through the imperial cities, or down to the Sahara before crossing the High Atlas.

Map of three routes from Tangier to Marrakech: motorway, imperial cities and Merzouga desert
Original map by experiumorocco.com. Tap to enlarge.
Map of three routes from Tangier to Marrakech: motorway, imperial cities and Merzouga desert

Route 1: the Atlantic coast (2 or 3 days)

This follows the motorway corridor. Asilah, about 45 km (28 mi) from Tangier, is a small whitewashed seaside town you can see in a couple of hours. Rabat, the capital, deserves at least a night: its medina, the Kasbah of the Udayas and the Hassan Tower are part of the site UNESCO listed in 2012. In Casablanca, the stop everyone makes is the Hassan II Mosque, one of the few mosques in Morocco open to non-Muslim visitors.

Route 2: Chefchaouen and the imperial cities (5 to 7 days)

From Tangier the road climbs into the Rif via Tetouan, whose medina is also a World Heritage Site. Chefchaouen is about 120 km (75 mi) away, roughly a 2-hour drive. It was founded in 1471 and took in Muslims leaving Granada from 1492 onwards, which explains its Andalusian look. The next day you head down to Fes, about 220 km (137 mi) further on.

Blue street with steps in the Chefchaouen medina
Chefchaouen, about two hours from Tangier through the Rif.
Monumental Bab Mansour gate in Meknes
Bab Mansour, the great gate of Meknes.
Blue street with steps in the Chefchaouen medina
Monumental Bab Mansour gate in Meknes

Fes needs at least a full day with a local guide; here are the best things to do in Fes. The Roman ruins of Volubilis and Meknes, Moulay Ismail’s capital, lie on the way to Rabat, where the route joins the motorway to Marrakech. This is the classic loop through the imperial cities of Morocco, and it is how the 7-day tour from Tangier to Marrakech is built: six nights, with guided visits in Fes, Volubilis and Marrakech.

Route 3: via the Merzouga desert and the High Atlas (9 or 10 days)

The longest route, about 1,800 km (1,120 mi), and the one with the biggest changes of scenery. After Fes, the road crosses the Middle Atlas via Ifrane and the cedar forests of Azrou, tops 2,000 m at Col du Zad and drops through Midelt and the Ziz Valley to Erfoud. The reward is Erg Chebbi: at Merzouga you reach the dunes on foot or by camel and spend a night in a desert camp.

Heading back west you follow the so-called road of the kasbahs: the Todra Gorge, the Dades Valley, the Skoura palm grove with Kasbah Amridil, Ouarzazate and the ksar of Ait Ben Haddou. The final day crosses the High Atlas over the Tizi n’Tichka pass before descending to Marrakech. The 9-day tour from Tangier to Marrakech via Merzouga follows this line, with one night in the desert.

Atlas cedar forest near Azrou in the Middle Atlas
The cedars of Azrou, in the Middle Atlas: the first big change of scenery after Fes.
Atlas cedar forest near Azrou in the Middle Atlas

Elevation profile: three routes on the same scale 

Distance only tells half the story. The chart plots the elevation of each route along the road, on the same scale for all three, and the lines move at the same speed, so you can see what each option means in miles and in mountains.

0 500 1,000 1,500 km Motorway and train, via Rabat and Casablanca575 km / 357 mi · max. about 580 m 1,000 2,000 Casablanca Marrakech Imperial cities route915 km / 569 mi · max. about 670 m 1,000 2,000 Chefchaouen Fes Rabat Marrakech Merzouga desert route1,817 km / 1,129 mi · max. 2,260 m 1,000 2,000 Fes Merzouga Dades Marrakech Col du Zad 2,180 m Tichka 2,260 m 0 m
Swipe the chart left to see all of it.

Chart by experiumorocco.com. Road distances between the cities of each stage, calculated with OpenStreetMap, and elevation from the Copernicus GLO-90 digital elevation model. Tizi n’Tichka: the pass’s official height. Approximate profile.

What the profile shows
RouteRoad distanceHighest point
Motorway and trainTangier, Rabat, Casablanca, Marrakech575 km / 357 miabout 580 m / 1,900 ft
Imperial citiesChefchaouen, Fes, Meknes, Rabatabout 915 km / 569 miabout 670 m / 2,200 ft
Merzouga desertFes, Middle Atlas, Merzouga, Dades, Tichkaabout 1,815 km / 1,128 mi2,260 m / 7,415 ft

The practical takeaway is simple. The first two routes never go much above 670 m and work in any season. The desert route climbs past 2,000 m twice, at Col du Zad and on the Tizi n’Tichka, and in winter those passes and Ifrane can see snow and ice: pack warm layers even if you are heading for the Sahara, and check the warnings from Morocco’s national weather service before you set off.

Hairpin bends of the Dades Gorge road seen from above
The hairpin road up the Dades Gorge: on the desert route, the mountains start long before the Tichka pass.
Hairpin bends of the Dades Gorge road seen from above

How many days do you need from Tangier to Marrakech? 

  1. 1 day: a straight transfer by train or motorway. You arrive in Marrakech in the afternoon.
  2. 2 or 3 days: the Atlantic coast, with a night in Rabat and a stop in Asilah or Casablanca.
  3. 5 to 7 days: Chefchaouen, Fes, Volubilis, Meknes and Rabat. The balanced choice for a first trip.
  4. 9 or 10 days: add the Merzouga desert, the gorges and Ait Ben Haddou. Expect long driving days of up to 6 or 7 hours.

A useful rule of thumb: for every new place where you want to spend a night, count half a day on the road. On the desert route, Fes to Merzouga alone is around 460 km (286 mi) and about 7 hours by car, so don’t try to squeeze it.

Practical tips for the trip 

  • When to go: spring and autumn are comfortable on all three routes. July and August are very hot inland and in the desert.
  • Money: tolls, roadside cafés and souks mostly take cash. Here is how the Moroccan dirham works.
  • Guides in the cities: in Fes, Meknes or Marrakech, hire licensed official guides; private tours already include them.
  • Safety: the journey itself is calm, but read our guide on whether Morocco is safe and your government’s official travel advice.

Frequently asked questions 

How far is Tangier from Marrakech?

About 575 km (357 mi) by motorway via Rabat and Casablanca, or roughly 500 km (310 mi) in a straight line. Going through Chefchaouen and Fes makes it about 950 km (590 mi), and via the Merzouga desert about 1,800 km (1,120 mi).

How long is the train from Tangier to Marrakech?

About 5 hours: around 2 h 10 on Al Boraq to Casablanca, then 2 h 40 to 3 h on an Al Atlas train to Marrakech, plus the connection.

Is there a direct high-speed train from Tangier to Marrakech?

Not yet. The Kenitra to Marrakech high-speed line has been under construction since April 2025 and is due to open at the end of 2029, bringing the journey down to about 2 h 40 without a change.

Can you drive from Tangier to Marrakech?

Yes. It takes 6 h 30 to 7 h at the wheel on toll motorways, not counting stops. With breaks and Casablanca traffic, allow a full day.

Is it worth going via Chefchaouen and Fes?

If you have at least five days, yes. Chefchaouen is about 2 hours from Tangier and Fes about 3 h 40 from Chefchaouen, and the route then joins Meknes, Rabat and the motorway to Marrakech.

Can you go from Tangier to Marrakech through the desert?

Yes, but allow about nine days. The route climbs through Fes and the Middle Atlas to Merzouga and returns via the Todra Gorge, the Dades Valley, Ouarzazate and the Tichka pass.

Sources 

Written by

Founder of Experium Morocco & Licensed Guide

Official licence No. GEN 321 Ministry of Tourism of Morocco

I'm Musta (Mustapha Ait Isha), a Berber from the Central High Atlas and an official mountain and desert tour guide. Trained at Morocco's national mountain guide school (CFAMM) in 2003, I have spent over 20 years leading treks, cycling tours, and journeys across Morocco's mountains and Sahara Desert. I write these articles from the field, backed by reliable and official sources, to share practical information before your trip.

Leave a comment