Morocco’s trains are run by the national railway, ONCF. They are comfortable, affordable and mostly punctual, and they connect Tangier, Rabat, Casablanca, Marrakesh, Fes, Meknes and Oujda. Al Boraq, Africa’s first high-speed train, links Tangier and Casablanca in just over two hours.
First or second class?
- First class – reserved seats and more space; recommended for long journeys.
- Second class – cheaper and still comfortable, but seats may not be reserved on regular trains.
How to book a train ticket online
- Pick your departure station, destination, date and class.
- Pay by card online or in the ONCF app.
- Your e-ticket arrives by email; show it on your phone or print it.
For places without a railway, such as Chefchaouen, Essaouira or Merzouga, take a bus or a car with a driver.
Trains in Morocco: frequently asked questions
Booking, classes, luggage, food on board and the main routes.
Where can I buy train tickets?
Online through the links on this page (via 12Go), on the ONCF website or app, or at ticket offices and machines in the stations.
Should I book in advance?
Yes, especially for Al Boraq, long journeys, weekends and holidays, when trains fill up.
What is the difference between first and second class?
First class has wider seats and guaranteed seat reservations. Second class is cheaper, with less space, and on regular trains seats are not always reserved.
Are Moroccan trains safe and punctual?
Yes, they are safe and generally reliable. Delays of 15–30 minutes can happen on long conventional routes; Al Boraq is very punctual.
What are the main train routes?
The main line runs Tangier – Rabat – Casablanca – Marrakesh, with a branch east to Meknes, Fes and Oujda. Al Boraq serves Tangier, Kenitra, Rabat and Casablanca.
Can I bring luggage?
Yes. There are racks above the seats and space for large suitcases at the ends of the carriages.
Is there food and drink on board?
Most long-distance trains have a trolley selling snacks and drinks. You are welcome to bring your own food.
Is there Wi-Fi on trains?
Al Boraq offers Wi-Fi; most other trains do not. A local SIM card with data is the easiest option.
Are there night trains?
ONCF runs some night trains with sleeper compartments, for example between Marrakesh and Tangier. For other overnight trips, consider a bus or a car with a driver.
Popular train routes in Morocco (2026)
Main train routes and journey times
Times are approximate and depend on the train type. Al Boraq high-speed trains run between Tangier, Kenitra, Rabat and Casablanca; other routes use regular intercity trains.
| Route | Fastest journey | Notes |
|---|---|---|
| Tangier – Casablanca | about 2 h 10 | Al Boraq high-speed train |
| Tangier – Rabat | about 1 h 20 | Al Boraq |
| Rabat – Casablanca | about 1 h | Frequent shuttles and Al Boraq |
| Casablanca – Marrakech | about 2 h 40 | Regular intercity trains |
| Casablanca – Fes | about 3.5–4 h | Via Rabat and Meknes |
| Fes – Meknes | about 40 min | Frequent trains |
| Fes – Marrakech | about 6.5–7 h | Direct trains or change in Casablanca |
| Marrakech – Tangier | about 5 h | Change to Al Boraq in Casablanca |
| Fes – Tangier | about 3–4.5 h | Direct, or with an Al Boraq connection |
| Fes – Oujda | about 5–6 h | Eastern line |
Where the trains don't go
There is no railway to Chefchaouen, Essaouira, Agadir, Ouarzazate or Merzouga. Supratours buses connect with trains at stations such as Marrakech and Fes, and you can buy a combined train + bus ticket. For the desert, a desert tour or a private driver is far more convenient.

Main stations
- Casablanca – Casa Voyageurs for long-distance and Al Boraq trains; Casa Port for the city centre and Rabat shuttles.
- Marrakech – a large modern station in Gueliz, 10 minutes by taxi from the medina.
- Fes – in the new town, about 15 minutes by taxi from the medina.
- Tangier – Tanger Ville, the northern terminus of the high-speed line.
- Casablanca airport – a direct train links Mohammed V Airport with the city.

Tips for train travel
- Book Al Boraq and weekend trains a few days ahead.
- Arrive 15–20 minutes early and check the platform on the departure boards.
- Keep your ticket until the end of the journey; it is checked on board and sometimes at the exit.
- First class is worth it on long routes such as Fes–Marrakech.
Can I use my phone as a ticket?
Yes, e-tickets bought online can be shown on your phone.
Is there a train from Marrakech to Merzouga?
No. Take a bus, or join a 3-day desert tour from Marrakech.
Are trains suitable for families?
Yes. Children travel at reduced fares, and first class gives you more space for luggage.
