
Capital to the Red City · By rail or road
Rabat to Marrakech by Train or Car
A direct ONCF train takes about three and a half hours from Rabat Ville or Rabat Agdal and lands you in Gueliz, a short taxi ride from the medina. Driving takes about as long.
Photograph: Jorge Láscar, CC BY 2.0
- Train, direct
- About 3 h 35 min
- Rabat stations
- Ville or Agdal
- By car
- About 320 km, 3 to 3.5 h
- Station to medina
- About 3.5 km
By City Tours Morocco Editorial Team
Published 5 December 2026 Last updated 5 December 2026
Rabat to Marrakech is the long southbound leg of most imperial-city trips. The train is the simple choice: direct services leave from both Rabat stations, run through Casablanca and reach Marrakech in about three and a half hours.
Driving saves little time and adds Casablanca traffic, so it only wins for groups with heavy bags or anyone who wants to stop on the way. Below: train against car, how to book, and how to get from Marrakech station to a riad in the medina.
Train vs Car: Side by Side
Times come from current route data and can change. Confirm on oncf.ma before you travel.
| Factor | Train (ONCF) | Car |
|---|---|---|
| Journey time | About 3 h 35 min on a direct service | About 3 to 3.5 hours, longer in Casablanca traffic |
| Distance | Rail line via Casablanca | About 320 km by road |
| Where you start | Rabat Ville (centre) or Rabat Agdal | Your hotel door |
| Where you arrive | Marrakech station, Gueliz (about 3.5 km from Jemaa el-Fnaa) | The nearest gate a car can reach to your riad |
| Tickets | oncf.ma or the ONCF app | Tolls on the motorway; fuel |
| Best for | Most travellers, especially with light luggage | Groups, families with lots of bags, or a stop on the way |
Rabat to Marrakech by train and by car.
How to Book the Train
Booking online takes a few minutes and skips the station queue.
Open oncf.ma or the ONCF app
Choose Rabat Ville or Rabat Agdal as the departure station and Marrakech as the arrival. Agdal is handy if you are staying in the Agdal or Hay Riad districts; Rabat Ville suits the medina and the city centre.
Pick a direct train
Direct services take about three and a half hours. Look for "sans correspondance" in the results. A departure that needs a change takes longer and gives you one more platform to find.
Choose a class
Second class is air-conditioned and fine for the trip. First class gives a reserved seat and more room, which helps on busy Friday and Sunday trains. Check both prices on oncf.ma.
Pay by card and keep the e-ticket on your phone
ONCF takes Visa and Mastercard. The ticket arrives by email with a barcode the conductor scans on board. Station ticket machines are the fallback.
Arriving in Marrakech
The station is in Gueliz, not the medina
Marrakech station stands on Avenue Hassan II in the new town. Jemaa el-Fnaa is about 3.5 km away, roughly 10 to 15 minutes by petit taxi depending on traffic.
Ask your riad which gate to use
Most medina lanes are closed to cars. Your riad will tell you the nearest gate or square a taxi can reach, and many will send someone to meet you there.
Insist on the meter
Petits taxis in Marrakech are metered. Ask for the meter before you set off, or agree the fare first if the driver refuses.
Rabat to Marrakech: Frequently Asked Questions
How long is the train from Rabat to Marrakech?
A direct ONCF train takes about 3 hours 35 minutes from Rabat Agdal and a few minutes longer from Rabat Ville, based on current route data. Services that need a change take longer. Check the exact timetable on oncf.ma or in the ONCF app before you travel.
Should I leave from Rabat Ville or Rabat Agdal?
Rabat Ville is the central station, within walking distance of the medina and the Hassan Tower area. Rabat Agdal is south of the centre in the Agdal district. Both have trains to Marrakech, so pick the one closer to where you are staying.
Is it faster to drive from Rabat to Marrakech?
Not by much. The drive is about 320 km and takes roughly 3 to 3.5 hours on the motorway via Casablanca, before traffic in Casablanca and Marrakech. The train takes about as long and you can read or sleep, so most travellers take the train unless they have heavy luggage or want to stop on the way.
Is there a high-speed train from Rabat to Marrakech?
Not yet. Al Boraq, the high-speed service, runs between Tangier and Casablanca and stops at Rabat Agdal. Trains south of Casablanca to Marrakech run on the conventional line.
How do I get from Marrakech station to my riad?
Take a petit taxi from the rank outside the station. The ride to Jemaa el-Fnaa is about 10 to 15 minutes. Tell the driver the gate or square your riad named, because cars cannot enter most medina lanes.
Can I do Rabat and Marrakech on the same day?
You can travel between them in a morning, but it is a long day to also sightsee in both. An early train from Rabat puts you in Marrakech for lunch, leaving the afternoon and evening for the medina and Jemaa el-Fnaa.