PLANNING GUIDE

Morocco by train

Morocco’s ONCF network links Marrakech to Oujda and serves the main cities except Agadir and Nador. The high-speed Al Boraq line serves Tangier, Kenitra, Rabat and Casablanca, with Tangier–Casablanca in about 2 h 10 min (Visit Morocco).

At a glance

Key rail journeys
From → toTimeSource
Tangier → Casablanca (high-speed)2 h 10Visit Morocco
Rabat → Tangier1 h 20Visit Morocco
Kenitra → Tangier50 minVisit Morocco
Rabat → Casablanca~1 hWikivoyage
Rabat → Fez~2½ hWikivoyage
Rabat → Marrakech~4 hWikivoyage
Meknes → Fez~40 minWikivoyage

Which should you choose?

Getting there and around

Buy tickets on the spot or on the ONCF website (Visit Morocco); book ahead to avoid the rush.

Casablanca’s airport has its own rail link to Casa-Port and Casa-Voyageurs (see the Casablanca arrival guide); an ONCF works notice says airport trains may terminate at Casa-Voyageurs, so check which station your service uses.

When to go

Visit Morocco’s best months are April–June and September–October for Casablanca and Rabat, March–May and September–November for Fez and Marrakech; summer train carriages and platforms can be hot.

Trade-offs

Only the Tangier–Kenitra stretch is true high-speed (300 km/h); elsewhere trains run at conventional speeds (Wikivoyage), so do not assume equal speed across the country.

Plan and search

Stay near the station you will use. Searching is free and shows prices only for the dates you enter.

Common questions about this guide

Does the train go to Marrakech?

Yes: ONCF connects Marrakech to Oujda (Visit Morocco); Wikivoyage gives about 4 hours from Rabat.

Is there a train to Agadir?

No: the network serves the main cities except Agadir and Nador (Visit Morocco).

Sources and review

Editorial notes on this page were checked against the public pages below on November 2026. They are independent references, not partners or suppliers of ATIP. Distances are as those sources state them; travel conditions and timetables change, so confirm current information before you travel.

How ATIP prepares its guides and what is live