Traveling by train is one of the easiest ways to explore Morocco’s major cities. The national railway operator, ONCF, connects important destinations including Tangier, Rabat, Casablanca, Marrakech, Fes, Meknes and other cities across the country.
Morocco also has Al Boraq, its high-speed train service connecting Tangier with Casablanca. For travelers visiting several Moroccan cities, combining trains with buses, taxis or private transfers can make it easier to reach destinations outside the railway network.
This guide explains how trains work in Morocco, the main routes, ticket prices, booking options and practical tips for international travelers.
Morocco’s Train Network

Morocco’s railway system is operated by ONCF (Office National des Chemins de Fer).
The network includes several types of services, including:
• Al Boraq high-speed trains
• Al Atlas intercity trains
• TNR regional trains on selected routes
The main tourist destinations connected by train include:
• Tangier
• Rabat
• Casablanca
• Marrakech
• Fes
• Meknes
• Oujda
• Kenitra
• Settat
• Benguerir
• El Jadida
The exact timetable depends on the route and travel date, so check the current ONCF schedule before planning your journey.
Al Boraq High-Speed Train

Al Boraq is Morocco’s high-speed railway service.
It currently operates between Tangier and Casablanca, serving important stations including Kenitra and Rabat Agdal.
The Tangier–Casablanca journey takes about 2 hours and 10 minutes on Al Boraq services.
The high-speed section allows trains to reach speeds of up to 320 km/h.
For tourists, Al Boraq is particularly useful when combining:
Tangier → Rabat → Casablanca
It is important to note that Al Boraq does not currently provide a high-speed service to Marrakech. Travelers going to Marrakech use conventional ONCF services or other transportation options.
Popular Train Routes in Morocco
Tangier to Casablanca
Tangier and Casablanca are connected by Al Boraq.
The journey takes approximately 2 hours and 10 minutes on direct Al Boraq services.
This is one of the most convenient train journeys for travelers visiting northern Morocco and Casablanca on the same trip.
Tangier to Rabat
Al Boraq connects Tangier with Rabat Agdal in roughly 1 hour and 20 minutes, depending on the service.
This makes it practical to combine Tangier and Rabat without renting a car.
Rabat to Casablanca
Rabat and Casablanca are connected by frequent conventional train services.
This is one of the easiest railway journeys in Morocco and is useful for travelers staying in either city.
Casablanca to Marrakech
Casablanca and Marrakech are connected by conventional ONCF trains.
The journey takes around three hours, depending on the specific service and timetable.
This route is particularly useful for visitors combining Casablanca with Marrakech.
Casablanca to Fes
ONCF also operates trains between Casablanca and Fes.
The journey generally takes several hours, with the exact duration depending on the service selected.
Fes can therefore be combined with Casablanca, Rabat and other cities without renting a car.
Marrakech to Fes
Marrakech and Fes are connected by ONCF’s Al Atlas services.
This is a much longer journey than Casablanca–Marrakech, so travelers should check the current timetable before booking.
For visitors who want to see both cities, the train can still be a practical option because it avoids the need to drive between them.
Morocco Train Ticket Prices

Train fares in Morocco are not one fixed price.
The cost depends on:
• Route
• Train type
• Class
• Travel date
• Fare conditions
• Availability
For this reason, it is better to check the current price directly through ONCF before traveling rather than relying on an old price published online.
ONCF’s booking website currently displays fares from selected departure cities and allows travelers to search for a specific journey. For example, the official booking system displays starting fares for routes such as Casablanca–Marrakech and Casablanca–Fes, but the exact fare depends on the journey selected.
Tip: If you are budgeting for a Morocco trip, use the current ONCF fare as your transportation cost rather than relying on a general estimate.
First Class vs Second Class
Moroccan trains generally offer First Class and Second Class.
Moroccan trains generally offer First Class and Second Class.
Second Class
Second Class is the standard economical option.
It is suitable for travelers who want to keep transportation costs low while traveling between Morocco’s major cities.
First Class
First Class costs more but provides a more comfortable travel experience.
It can be worth considering for longer journeys, especially if you prefer additional comfort during several hours of travel.
When booking online, check which class is available for your specific train.
How to Buy Train Tickets in Morocco

You can buy Moroccan train tickets through the official ONCF Voyages website or at railway stations.
The official booking system allows travelers to enter:
Departure station
• Arrival station
• Travel date
• Return date
• Number of passengers
• Travel class
You can also consult timetables and manage an existing booking through the official website.
For popular departures, booking ahead can make it easier to choose the departure time that fits your itinerary.
Traveling from Mohammed V Airport by Train
Morocco’s Mohammed V International Airport is connected to the railway network.
ONCF lists a dedicated railway service between Casablanca and Mohammed V Airport.
This allows travelers arriving at the airport to continue their journey by train rather than arranging a separate long-distance transfer.
If your final destination is another Moroccan city, check the connection from the airport to the relevant railway station before traveling.
Can You Travel Around Morocco Only by Train?
Not completely
The railway is useful for many major Moroccan cities, but not every tourist destination has a train station.
For example, travelers visiting places such as:
• Chefchaouen
• Essaouira
• Smaller Atlas Mountain destinations
• Desert destinations
• Rural areas
may need to combine trains with buses, taxis, private transfers or other transportation.
This is why a Morocco itinerary often works best when you combine different forms of transport.
Morocco by Train vs Bus
Both trains and buses can be useful for tourists.
Train
Trains are particularly useful when traveling between major cities connected to the railway network.
Advantages include:
• Comfortable journeys
• Useful city-center connections
• Several major tourist destinations connected
• High-speed service between Tangier and Casablanca
Bus
Buses can be more useful when traveling to destinations without convenient railway connections.
They can also complement a train itinerary when your final destination is outside the railway network.
For example, you could take a train to a major city and continue by bus or private transfer.
Tips for Traveling by Train in Morocco
Check the Timetable Before Your Trip
Train schedules can change, so check the current ONCF timetable for your travel date.
ONCF publishes schedules for several major railway axes, including Al Boraq Casablanca–Tangier and Al Atlas routes such as Marrakech–Fes and Marrakech–Tangier.
Arrive at the Station Early
Arriving early gives you time to find the correct platform, check your train and organize your luggage.
This is especially useful if you are traveling from a large station for the first time.
Check the Station Name
Pay attention to the station shown on your ticket.
For example, Rabat has different railway stations, and Al Boraq services use Rabat Agdal.
Keep Your Ticket Accessible
Keep your ticket available during the journey because railway staff may check it.
Travel With Manageable Luggage
If you are moving between several cities, lighter luggage makes train travel easier, especially when changing trains or using taxis after arrival.
Book Al Boraq Ahead When Possible
If you have a specific Al Boraq departure in mind, booking ahead can help you secure the desired departure and class.
A Sample Morocco Train Itinerary
You can build a multi-city Morocco trip around the railway network.
For example:
Day 1–2: Tangier
Explore Tangier and its historic medina.
Day 3: Rabat
Take Al Boraq from Tangier to Rabat.
Day 4–5: Casablanca
Continue to Casablanca and explore the city.
Day 6–8: Marrakech
Travel from Casablanca to Marrakech by conventional train.
Day 9–11: Fes
Take an ONCF service from Marrakech toward Fes.
This itinerary is only an example. The number of days you need in each city depends on your interests and overall trip length.
What Destinations Are Not Connected by Train?
Some of Morocco’s most popular tourist destinations are outside the main railway network.
For example, Chefchaouen and Essaouira do not have direct railway stations.
If you want to visit these destinations, you will need another form of transportation for at least part of the journey.
This is important when planning a Morocco trip because a train-only itinerary will not cover the entire country.
Is Morocco by Train Good for First-Time Visitors?
For travelers visiting Morocco’s major cities, trains can be a practical way to move between destinations.
The railway network is particularly useful for routes involving:
Tangier → Rabat → Casablanca → Marrakech
and:
Casablanca → Fes → Meknes
However, the best transportation option depends on your complete itinerary. A combination of train travel and other forms of transportation can be more practical when visiting destinations outside the railway network.
Conclusion
Traveling by train can make a Morocco trip easier, especially when visiting the country’s major cities.
The Al Boraq high-speed service is currently the fastest rail option between Tangier and Casablanca, while conventional ONCF services connect Marrakech, Fes, Meknes and many other destinations.
Before buying a ticket, check the latest ONCF timetable, fare and train information for your exact travel date.
With some planning, you can use Morocco’s railway network as an important part of a multi-city itinerary without renting a car.
Related Travel Guides
• Morocco Travel Guide: 15 Best Places, Costs, Safety & 7-Day Itinerary
• Best Things to Do in Marrakech: 25 Must-See Attractions and Experiences
• Best Hotels in Morocco: Top Places to Stay for Every Budget
• UNESCO World Heritage Sites in Morocco: Complete Travel Guide
• How to Get Around Marrakech: Complete Transportation Guide
