Travel

Morocco Trains (ONCF): Complete Guide

212 Dailyยท June 22, 2026ยท 2 min read
Morocco Trains (ONCF): Complete Guide
Morocco's national rail operator is ONCF, which runs comfortable trains linking Tangier, Rabat, Casablanca, Fez, Meknes and Marrakech. The Al Boraq high-speed line connects Tangier and Casablanca in about 2 hours, and you can book online, at stations, or via the ONCF app.

The ONCF network

ONCF (Office National des Chemins de Fer) operates the country's passenger rail network, linking most major cities in the north and centre. Key hubs are Casablanca, Rabat, Fez, Meknes, Marrakech and Tangier.

There is no direct train to the far south or the desert; the network ends at cities like Marrakech and Oujda, beyond which you continue by bus, grand taxi or car. Agadir, for example, is reached by connecting bus.

Al Boraq high-speed trains

Al Boraq is Africa's first high-speed line, running between Tangier and Casablanca via Rabat at speeds up to 320 km/h. It covers Tangier to Casablanca in about 2 hours, a journey that previously took nearly 5.

Al Boraq has first and second class, with comfortable seating and reserved seats. Book ahead for the best fares and to guarantee a seat on popular departures.

Standard trains and classes

Conventional ONCF trains (branded Al Atlas) serve routes like Casablanca-Marrakech and Casablanca-Fez. Most offer first class (reserved seats, less crowded) and second class (cheaper, can be busy).

First class is well worth the modest extra cost on long or busy routes for a guaranteed reserved seat and more space. Trains are generally clean, air-conditioned and punctual.

Key routes and journey times

Popular journeys include Casablanca to Marrakech (about 3 hours), Casablanca to Rabat (about 1 hour), Rabat to Fez (around 2.5 hours), and Tangier to Casablanca on Al Boraq (about 2 hours).

Trains run frequently between Casablanca and Rabat, effectively a commuter corridor, while intercity routes have several departures daily. Check the timetable, as frequency varies by route.

Booking and tickets

You can buy tickets at station counters, ticket machines, the ONCF website, or the ONCF (and Al Boraq) mobile app. For Al Boraq and busy intercity trains, booking in advance secures cheaper fares and a reserved seat.

Standard Al Atlas tickets can usually be bought on the day. Keep your ticket to show conductors, and note that reserved-seat trains assign you a coach and seat number.

Tips for a smooth journey

Arrive 20-30 minutes early at busy stations like Casa-Voyageurs and watch the boards for your platform. Stations are generally safe but keep an eye on luggage.

There is no checked baggage; you keep bags with you on overhead racks. Bring water and snacks, though longer trains often have a trolley or cafe car. For airport transfers, the train from Mohammed V Airport connects directly into the Casablanca network.

RouteTrain typeApprox time
Tangier - CasablancaAl Boraq (high-speed)~2 h
Casablanca - RabatAl Atlas / Al Boraq~1 h
Casablanca - MarrakechAl Atlas~3 h
Rabat - FezAl Atlas~2.5 h
Casablanca - FezAl Atlas~3.5 h

Popular ONCF routes and times

FAQ

Is there a high-speed train in Morocco?

Yes. Al Boraq is Africa's first high-speed train, linking Tangier and Casablanca via Rabat at up to 320 km/h, covering Tangier to Casablanca in about 2 hours.

How do I book ONCF train tickets?

Buy at station counters or machines, on the ONCF website, or via the ONCF mobile app. Book Al Boraq and busy intercity trains in advance for cheaper fares and a reserved seat.

Is there a train to Marrakech and the desert?

Trains reach Marrakech in about 3 hours from Casablanca, but the rail network does not extend to the Sahara. From Marrakech you continue to the desert by tour, bus or car.

โ˜…โ˜…โ˜…โ˜…โ˜…Reader reactions

Loved this? Useful? React below โ€” your feedback helps other readers.

Leave a comment โ†’

More Morocco articles โ†’ Learn Darija โ†’