Trains are one of the easiest ways to travel between Morocco's big cities. The national rail company ONCF runs Africa's first high-speed line, Al Boraq, between Tangier and Casablanca, plus a network of comfortable intercity trains to Marrakech, Fes and Meknes. Here is how the Morocco train network works, with routes, times and tips.
The Morocco train network at a glance
| Route | Train | Approximate time |
|---|---|---|
| Tangier – Rabat | Al Boraq | about 1 h 20 |
| Tangier – Casablanca | Al Boraq | about 2 h 10 |
| Casablanca – Rabat | Al Boraq or Al Atlas | about 1 h |
| Casablanca – Marrakech | Al Atlas | about 2 h 40 to 3 h |
| Casablanca – Fes | Al Atlas | about 3 h 30 to 4 h |
| Fes – Meknes | Al Atlas | about 40 min |
| Marrakech – Fes | Al Atlas | about 7 h |
| Casablanca airport – city centre | shuttle train | about 35 min |
Times vary by service; check the timetable when you book.
Al Boraq: the high-speed train
- Opened in 2018, Al Boraq links Tangier, Kenitra, Rabat and Casablanca, reaching up to 320 km/h on the high-speed section.
- Tangier to Casablanca takes about 2 hours 10 minutes, against nearly 5 hours before.
- Extension to Marrakech: a new high-speed line from Kenitra to Marrakech is under construction and planned before the 2030 World Cup. Until then, travellers to Marrakech change to a classic train.
Classic trains (Al Atlas)
The Al Atlas intercity trains serve Marrakech, Fes, Meknes, Oujda and the coast. They are comfortable, air-conditioned and generally punctual, though delays happen.
- Night train: a sleeper service runs between Tangier and Marrakech, with couchettes.
- Airport train: links Casablanca Mohammed V airport to Casa Voyageurs and Casa Port.
First or second class?
- First class: assigned seats, more space and fewer people, worth it on long routes and in busy periods.
- Second class: cheaper and usually fine for short trips, but trains can be crowded on weekends and holidays.
How to buy tickets
- ONCF app or website: the easiest option, with e-tickets on your phone.
- At the station: ticket offices and machines; bring your passport for some fares.
- Book ahead for Al Boraq and on weekends, holidays and Eid: prices vary with demand and trains fill up.
Bus connections
Trains don't reach Essaouira, Agadir, Ouarzazate or Chefchaouen. Supratours (linked to ONCF) and CTM buses connect from the stations: see Marrakech to Essaouira.
Train or car?
- Train: perfect for the Tangier–Rabat–Casablanca–Marrakech–Fes axis.
- Car: better for the Atlas, the desert and small villages; see renting a car in Morocco.
For a full route, see our Morocco itinerary.
FAQ
Is the train a good way to travel in Morocco? Yes, between the big cities. Trains are comfortable, affordable and avoid long drives. For the Atlas and the desert, you need a car or a tour.
How long is the train from Casablanca to Marrakech? About 2 hours 40 minutes to 3 hours on the Al Atlas intercity train.
Does Al Boraq go to Marrakech? Not yet. Al Boraq runs between Tangier and Casablanca; a high-speed extension to Marrakech is under construction and planned before 2030.
Can I buy Moroccan train tickets online? Yes, on the ONCF app or website, with e-tickets on your phone.
Planning your trip to Morocco? Our team helps you build the right itinerary. Get personalized advice →



