Morocco has one of the best railway networks in Africa — and most first-time visitors have no idea. The country runs Africa’s first high-speed line, the Al Boraq, which covers Tangier to Casablanca in about two hours and ten minutes, plus a web of comfortable classic trains linking Rabat, Fes, Meknes and Marrakech. Tickets are inexpensive, stations are modern, and the view from a window seat — olive groves, Atlas foothills, whitewashed towns — is a trip highlight in itself.
This guide covers how trains in Morocco actually work: where the network goes (and where it doesn’t), how to buy tickets, what first and second class really get you, and a few calm habits that make station days feel effortless. Riding the rails here isn’t an adventure you need to brace for — it’s genuinely one of the easiest ways to see the country.
Al Boraq: Africa's first high-speed train
Launched in November 2018, the Al Boraq runs between Tangier and Casablanca via Kenitra and Rabat, reaching up to 320 km/h on its high-speed section. Tangier to Rabat takes around an hour and twenty minutes; the full run to Casablanca is roughly two hours and ten — a journey that takes five to six hours by road. Trains are modern, air-conditioned and fully reserved, with a café car and comfortable seating in both classes. If your route touches the Tangier–Casablanca corridor, this is the way to travel it. Many visitors arriving by ferry from Spain step off the boat and onto the Al Boraq the same afternoon.
Where the trains go — and where they don't
The national operator is ONCF (Office National des Chemins de Fer), and its network connects most of the cities travellers actually visit:
- Casablanca–Marrakech: comfortable classic trains, around three hours, running throughout the day.
- Casablanca/Rabat–Fes: via Meknes, roughly three and a half to four hours from Casablanca — a lovely ride through farmland and hills toward the old imperial capital of Fes.
- Tangier–Casablanca: the Al Boraq high-speed line described above.
- Casablanca–Oujda: the long eastern line, including an overnight option with couchettes.
Just as important is where trains don’t go: there is no rail line to Chefchaouen, Essaouira, Agadir or the Sahara. For those, you’ll switch to buses or shared taxis — more on that below. Plan your route around the rail spine (Tangier–Rabat–Casablanca, then branches to Marrakech and Fes) and the whole country opens up neatly.
Tickets, classes and what they cost
Buying tickets is straightforward: use the ONCF website or app, the machines in stations, or the staffed counters (staff in major stations generally speak French and enough English to help). Fares are refreshingly low — expect roughly 100–150 dirhams (about $10–15) in second class between Casablanca and Marrakech, and around 200–350 dirhams for the Al Boraq depending on class and when you book. First class buys you a guaranteed seat in a quieter, roomier coach and costs only a little more; on busy classic routes it’s worth it, since second class can fill up on weekends and holidays. Al Boraq seats are reserved in both classes, so there you can simply pick whichever fits your budget.
What riding a Moroccan train is like
Relaxed, mostly. Trains are a slice of everyday Moroccan life: students heading home, families with picnics, businesspeople between Rabat and Casablanca. Someone will almost always help you lift a suitcase onto the rack, and it’s normal to be offered a share of whatever snacks your seatmates unpack. Carriages are air-conditioned on modern stock; a trolley or café car covers coffee and water on longer routes, though bringing your own bottle is smart in summer. Announcements are in Arabic and French, so keep an eye on station signs or your phone’s map as you approach your stop — platforms are clearly named, and stops are long enough that you won’t be rushed.
Easy station habits that make travel smooth
Moroccan stations — especially the gleaming newer ones in Casablanca, Rabat, Tangier and Marrakech — are easy to navigate. A few small habits keep everything friction-free:
Enough time to find your platform calmly and grab a coffee. Al Boraq platforms have ticket checks before boarding, so build in a few extra minutes.
The same common-sense rule as any busy station in Europe: luggage on the rack above your seat or at your feet, valuables on you. Petty theft is uncommon on trains, and this keeps it that way.
Landing in Marrakech and heading to Fes in three days? Buy that ticket while you’re already in the station — it takes two minutes and removes any holiday-weekend surprise.
Petits taxis wait outside every major station. Ask for the meter or agree the fare before setting off — our Marrakech arrival guide covers typical fares and the same logic applies at rail stations.
Beyond the rails: buses and grands taxis
Where the tracks end, Morocco’s excellent intercity buses take over. Supratours — ONCF’s own bus arm — is designed to connect with trains: arrive in Marrakech by rail, then ride Supratours onward to Essaouira (about three hours) or Agadir. CTM is the other reliable national operator, with modern coaches, luggage tags and fixed timetables bookable online. For Chefchaouen, buses from Tangier or Fes are the standard route. Grands taxis (shared Mercedes or vans running fixed intercity routes) fill the remaining gaps — pay for two seats if you want the front to yourself. Between trains, Supratours and CTM, you can cross the whole country comfortably without ever renting a car.
Staying connected on the way
A window seat is better with data. Train Wi-Fi is not something to count on in Morocco, but 4G coverage along the main rail corridors is good — so a local data plan means live maps, ticket confirmations and video calls home from your seat. An eSIM is the easiest way to get it: install before you fly and you’re online the moment you land, no shop queue needed. Stay Safe Morocco’s plans start from $9 for 10 GB, with 15 GB and 20 GB options for longer trips.
Connectivity is also your quiet safety layer. With the Stay Safe Morocco app, one tap on SOS dials the correct local emergency number and logs your exact GPS position — reassuring when you’re somewhere between stations and the town names are new to you. And because the essentials work offline, Morocco’s emergency numbers are always in your pocket even in a coverage gap:
The bottom line
Trains in Morocco are cheap, comfortable, scenic and easy — one of the country’s most underrated travel experiences. Build your itinerary around the rail spine, book the Al Boraq for the Tangier–Casablanca corridor, let Supratours and CTM handle the coast and the mountains, and you’ll move around Morocco with the same ease as the locals sharing your carriage. Trains here reward exactly the mindset we recommend for the whole country in our Morocco safety guide: a little preparation, then relax and enjoy the ride.
Frequently asked questions
Are trains in Morocco safe for tourists? Yes. Moroccan trains are widely used by families, students and business travellers, and incidents affecting tourists are rare. Apply normal station common sense — keep your bag in sight and use official taxis at exits — and rail is one of the most relaxed ways to get around the country.
How fast is the Al Boraq train? The Al Boraq reaches up to 320 km/h on its high-speed section between Tangier and Kenitra, covering Tangier to Casablanca in about two hours and ten minutes — versus five to six hours by road.
Can I take a train from Marrakech to Chefchaouen or Essaouira? No — neither town has a rail line. Take the train as far as it goes, then switch to Supratours (which connects directly with trains, including Marrakech to Essaouira) or CTM buses. For Chefchaouen, buses run from Tangier and Fes.
Do I need to book Moroccan train tickets in advance? For the Al Boraq and for travel on weekends or Moroccan holidays, booking a day or two ahead via the ONCF app, website or a station counter is wise. On quieter classic routes you can usually buy a ticket shortly before departure.
Is first class worth it on Moroccan trains? Usually, yes — it costs only slightly more and guarantees a reserved seat in a quieter coach, which matters on busy classic routes like Casablanca–Marrakech. On the Al Boraq, both classes are reserved and comfortable, so second class is excellent value.
🛡 Land in Morocco already connected — and safe
Every StaySafe Morocco eSIM comes with free Family SOS: one tap to reach emergency help and share your live location with your family. Nationwide 4G, keep your number, from $9.
Get your eSIM + Family SOS →Before you go — related guides
Explore Morocco — city guides
- Agadir
- Best Things to Do in Marrakech: The Essential Guide
- Casablanca
- Chefchaouen
- El Jadida
- Essaouira Culture Guide: Gnaoua Music, Art & Local Life
- Essaouira
- Fes
- Marrakech in Summer: Pools, Heat & How to Stay Cool
- Marrakech
- Meknes
- Nador
- Ouarzazate
- Oujda
- Rabat
- Safi
- Tangier
- Tétouan