Train Travel in Morocco: A Local Guide to Routes, Tickets & ONCF
Train travel in Morocco is one of the easiest ways to move between the country’s major cities. I’m Kamal, a licensed Moroccan tour guide, and I often recommend the train for routes such as Casablanca to Rabat, Tangier or Marrakech because it can be comfortable, straightforward and much easier than dealing with a rental car.
But there is one thing you should understand before planning your trip: you cannot travel everywhere in Morocco by train.
The railway works very well for cities such as Tangier, Rabat, Casablanca, Marrakech, Meknes and Fes. Places such as Chefchaouen, Essaouira, Agadir and the Sahara require another form of transport for at least part of the journey.
In this guide, I’ll explain where Morocco’s trains go, how to buy tickets, the difference between first and second class, how Al Boraq works and when I would choose the train over a bus, rental car or private driver.
If you are still comparing all your options, start with my Morocco Transportation Guide.
Table of Contents
Table of Contents
Can You Get Around Morocco by Train?
Yes, you can travel around a good part of Morocco by train, but you cannot rely on trains for an entire Morocco itinerary.
For most first-time visitors, the railway is particularly useful for:
- Tangier
- Rabat
- Casablanca
- Marrakech
- Meknes
- Fes
There are other stations and rail routes around the country, but these six cities cover many of the journeys international travelers are most likely to make.
The important mistake to avoid is assuming that every major tourist destination has a railway station.
There is no direct train to places such as:
For example, you can travel from Casablanca to Marrakech by train, but you cannot continue from Marrakech to Essaouira by rail. You can reach Fes by train, but Chefchaouen requires road transport.
My advice is to plan your transport route by route rather than deciding that your whole Morocco trip must be by train.
Morocco Train Map: Where Do the Trains Go?

For travelers planning train travel in Morocco, the railway network is easier to understand as a few main corridors.
The most useful northern route connects:
Tangier → Kenitra → Rabat → Casablanca
This is the main Al Boraq high-speed corridor.
From Casablanca, conventional rail connections continue south toward Marrakech and east toward Meknes and Fes.
There are also services to cities such as Oujda, Nador, El Jadida, Safi and other destinations, but most first-time visitors will build their rail journeys around the main tourist cities.
Casablanca is therefore one of the most important hubs in the system. Mohammed V International Airport also has a rail connection into Casablanca, which can be useful if you are continuing your journey by train.
When looking at a Morocco train map, remember that being geographically close to a railway line does not mean a destination has a useful passenger connection.
If you are building your complete route through the country, my Morocco Travel Guide will help you see how the cities, desert and coast fit together.
Local tip: Use Morocco’s train network for the parts of your itinerary where rail is strong. Do not force the train into places where road transport is clearly better.
The Most Useful Train Routes in Morocco
These are some of the train journeys I find most useful for international visitors.
| Route | Approx. Journey Time | Service | My Take |
|---|---|---|---|
| Casablanca → Marrakech | Around 2 hr 40 min–3 hr | Al Atlas | Very useful |
| Casablanca → Rabat | Around 50–60 min | Al Boraq/other services | Excellent |
| Casablanca → Tangier | Around 2 hr 10–20 min | Al Boraq | Excellent |
| Rabat → Tangier | Around 1 hr 20–30 min | Al Boraq | Excellent |
| Casablanca → Fes | Around 3 hr 45 min–4 hr | Al Atlas | Very useful |
| Marrakech → Fes | Around 6 hr 30 min | Al Atlas | Useful, but long |
| Fes → Meknes | Around 35–40 min | Al Atlas | Excellent |
Journey times are approximate and can change with the timetable. Always check ONCF for your actual travel date, especially if the train connects with a flight or another important reservation.
Casablanca to Marrakech by Train
This is one of the routes I recommend most often.
Direct trains connect Casa Voyageurs with Marrakech, with many journeys taking roughly three hours or a little less.
If you simply want to move between the two city centers, the train often makes more sense than flying or renting a car. You avoid motorway driving, tolls and finding somewhere to park when you arrive.
The main detail to watch is the station. Casablanca has several railway stations, so check the exact departure shown on your ticket rather than assuming Casa Voyageurs and Casa Port are interchangeable.
If you are considering this journey as a sightseeing day rather than simply transport, I explain the trade-offs in my Casablanca day trip from Marrakech guide.
For Marrakech to Casablanca, the same advice applies in reverse. I would normally choose the train unless I needed door-to-door service or sightseeing stops along the way.
If you are continuing directly to an international flight from Casablanca Airport, leave a generous margin. I would never build a tight train-to-flight connection simply because the timetable looks possible.
Casablanca, Rabat and Tangier by Train
This is where Morocco’s rail network is at its best.
Al Boraq connects Casa Voyageurs, Rabat Agdal, Kenitra and Tanger Ville, making travel between these cities fast and straightforward.
Casablanca to Tangier currently takes a little over two hours on many services, while Rabat to Tangier is roughly an hour and a half or less depending on the timetable.
For most independent travelers moving between these cities, I would choose Al Boraq over driving unless they specifically need a vehicle once they arrive.
Casablanca to Fes by Train
Casablanca to Fes is another practical rail journey.
Expect roughly four hours depending on the service. It works particularly well if your goal is simply to reach Fes without sightseeing stops.
If you want to turn the journey into a road trip with places such as Meknes or Volubilis along the way, a car or private driver gives you more flexibility.
Once you arrive, my Fes Travel Guide covers the medina, things to do, where to stay and practical local advice.
Fes to Meknes by Train
Fes and Meknes are close enough that the train is an easy choice, with many services taking around 35 to 40 minutes.
However, remember that Volubilis does not have a train station. If you want to combine Meknes and Volubilis in one day, plan the complete journey rather than looking only at the short Fes–Meknes rail section.
Marrakech to Fes by Train
There are direct trains between Marrakech and Fes, but this is a long journey of roughly six and a half hours on many services.
If your only goal is getting from one city to the other, it can be comfortable because you avoid driving for most of the day.
But if you want to see Ait Ben Haddou, the Dades Valley and Merzouga between Marrakech and Fes, I would not take the direct train.
That overland route through the mountains and Sahara is part of the experience itself. My 7 Days in Morocco Itinerary shows how that journey can work without returning along the same road.
How to Buy Train Tickets in Morocco

Buying tickets for train travel in Morocco is fairly straightforward once you know where to look.
For most travelers, I recommend checking the official ONCF Voyages website first. You can search by departure station, destination and date, choose your class and fare, and receive an electronic ticket.
Tickets are also available through the ONCF Voyages mobile app and at railway stations.
Buying Tickets Online
On ONCF Voyages, check carefully before paying:
- travel date
- departure time
- departure station
- destination station
- first or second class
- fare conditions
Station names matter, particularly in Casablanca and Rabat.
The cheapest available ticket may also have different change or refund conditions from a more flexible fare, so look at the conditions instead of choosing only by price.
Prefer an International Booking Platform?
Some Morocco train routes can also be booked through 12Go.
Compare Morocco train tickets and schedules on 12Go →
I would still compare the final price with ONCF before paying. A third-party platform can be useful if you prefer an international booking interface or have trouble completing a payment directly through ONCF.
Using the ONCF Voyages App
The official ONCF Voyages app allows you to search journeys, select available fares and buy tickets from your phone.
Your ticket can stay inside the app and can also be downloaded.
I recommend downloading the ticket before leaving your hotel or riad. That way, you are not depending on mobile data while standing at the station.
Buying Tickets at the Station
You can also buy train tickets at station ticket counters, and some stations have self-service machines.
If your schedule is flexible, buying at the station can be perfectly reasonable.
If you need one specific departure, especially on Al Boraq or during a busy travel period, I prefer having the ticket arranged beforehand.
Can You Pay With a Foreign Credit Card?
ONCF supports online bank-card payments, but I would not promise that every foreign-issued card will work every time.
If your payment is declined, it does not necessarily mean the train is sold out. Try another card, the ONCF Voyages app, buy the ticket at the station or use a reputable third-party booking platform.
If you travel internationally often, Wise can also be useful as a backup travel card. It can be used in most places that accept Visa or Mastercard debit cards and can be useful for paying in local currencies while traveling.
Check Wise for your trip to Morocco →
I would still carry a second payment method. Even with a travel card such as Wise, I would never guarantee that one particular online payment will be accepted by ONCF.
Do You Need to Print the Ticket?
Normally, no.
ONCF e-tickets can be downloaded and shown on a smartphone. A paper copy is optional.
I would download the PDF or keep the ticket available offline before you travel.
How Far Ahead Should You Book — and Do Morocco Trains Sell Out?
You do not need to book every Moroccan train weeks in advance, but a particular departure or class can fill up.
I would buy earlier when:
- you need a specific departure
- you want first class
- you are traveling on Al Boraq
- you are traveling during a busy holiday period
- the train connects with a flight, tour or important reservation
Reserved Al Atlas services also use numbered seats in first and second class, so waiting until the last minute can mean your preferred departure is no longer available.
Booking ahead can sometimes give you access to better fares as well.
My rule is simple: once your itinerary is fixed and you find a train and fare that suit you, there is little advantage in deliberately waiting.
Local tip: If missing your train only means taking a later departure, you can be more relaxed. If it would affect a flight or tour, book earlier and build in extra time.
First Class vs Second Class on Morocco Trains
Both first and second class are perfectly usable for tourists.
The choice depends mainly on journey length, price difference and how much comfort matters to you.
| Feature | First Class | Second Class |
|---|---|---|
| Price | More expensive | Cheaper |
| Reserved seat | Yes on reserved services | Yes on reserved services |
| Comfort | More space and usually quieter | Good for most journeys |
| Best for | Longer journeys | Short trips and budget travel |
| My choice | Worth checking on long routes | Fine for many shorter routes |
For a short journey such as Fes to Meknes, I would normally be happy with second class.
For a long trip such as Marrakech to Fes, I would compare the first-class fare. You will be sitting for several hours, so extra space can be worth paying for.
The same applies to Al Boraq. Check both fares rather than automatically assuming you need first class.
One thing I would make clear: first class in Morocco is more comfortable, but it is not an Orient Express-style luxury train experience.
Al Boraq: Morocco’s High-Speed Train

Al Boraq is Morocco’s high-speed train.
The current passenger route links:
Casablanca → Rabat → Kenitra → Tangier
The main tourist stations are Casa Voyageurs, Rabat Agdal, Kenitra and Tanger Ville.
For me, this is one of the easiest rail journeys to recommend in Morocco. If you are traveling between Casablanca, Rabat and Tangier without needing sightseeing stops along the road, Al Boraq is difficult to beat.
Both first and second class are available, and seats are reserved.
Is There a Bullet Train From Marrakech to Casablanca?
No, not yet.
This is worth clarifying because you may see news about Morocco’s new high-speed railway extension to Marrakech.
The project is being developed, but travelers going between Casablanca and Marrakech today still use the conventional railway, not an Al Boraq high-speed service to Marrakech.
So do not plan your current trip using future high-speed journey times you may see reported online.
What Is Al Atlas?
Al Atlas is ONCF’s conventional long-distance intercity service and covers many routes outside the current Al Boraq high-speed corridor.
The easiest way to remember the difference is:
Al Boraq = current high-speed service between Casablanca and Tangier
Al Atlas = conventional intercity trains across more of Morocco
You do not need to become an expert on the names. Search your route, check the departure time and class, and choose the train that works best for your itinerary.
What Are Trains in Morocco Like?
For most visitors, train travel in Morocco is comfortable and practical for intercity journeys.
Al Boraq is the most modern service. Its trains offer air-conditioned carriages, seating with tables and electrical sockets, while first class provides more space.
Conventional Al Atlas trains can vary more, so I would not expect every carriage to feel identical.
Overall, the experience is good enough for most travelers using the main rail routes.
Taking Luggage on Morocco Trains
A normal suitcase or backpack is usually straightforward.
On Al Boraq, luggage can be stored above the seats and in areas intended for larger bags.
Unlike flying, you normally keep responsibility for your luggage yourself.
I recommend keeping passports, money and electronics in a smaller bag with you and watching your larger luggage when passengers are boarding and leaving.
If you are traveling with several large suitcases, small children or a group, train travel is still possible, but door-to-door transport may be more convenient.
Is Train Travel Safe in Morocco?
Yes, I consider train travel in Morocco generally safe for visitors.
Use the same precautions you would in any busy railway station. Keep your phone, wallet and passport secure, and keep track of your luggage.
I would also think about what happens after you arrive.
Stations in Marrakech, Fes and other cities are not necessarily beside your riad or hotel. If you arrive late at night, particularly with children or several bags, know how you are getting from the station to your accommodation.
The final kilometer often requires more planning than the train journey itself.
When I Recommend the Train — and When I Don’t
I would never choose a train simply because a railway line exists. I look at the whole journey: travel time, luggage, where you are staying and whether there is anything worth seeing along the road.
I normally recommend trains for routes such as Casablanca–Rabat, Casablanca–Tangier, Rabat–Tangier, Casablanca–Marrakech, Casablanca–Fes and Fes–Meknes.
These are straightforward city-to-city journeys, and a private vehicle often adds cost without adding much value.
I would usually choose road transport instead for routes such as Marrakech–Essaouira, Fes–Chefchaouen, Marrakech–Agadir, Marrakech–Ait Ben Haddou and journeys through the Sahara.
The desert is the clearest example.
If you travel directly from Marrakech to Fes by train, you miss Ait Ben Haddou, the Dades Valley, Todra Gorge and Merzouga. If those places are part of your dream trip, the journey itself needs to happen by road.
Train vs Bus vs Rental Car vs Private Driver
| Transport | Best For | Main Drawback |
|---|---|---|
| Train | Major connected cities | Limited network |
| Bus | Destinations without rail | Usually slower |
| Rental car | Flexible road trips | Driving and parking in cities |
| Private driver | Families, luggage and flexible routes | Higher cost |
A rental car becomes much more useful once your route moves away from the main railway network. My Rent a Car in Morocco Guide explains prices, deposits, insurance and when having your own vehicle actually makes sense.
For a longer journey mixing trains, roads, cities and the Sahara, compare the routes in my Morocco Itinerary 7, 10 & 14 Days guide.
My advice: Do not choose one form of transport for your entire trip. Use the train where it makes Morocco easier, and switch to road transport where it gives you a better journey.
FAQs About Train Travel in Morocco
Can Tourists Travel Around Morocco by Train?
Yes, trains work very well between major cities such as Tangier, Rabat, Casablanca, Marrakech, Meknes and Fes. However, you cannot build every Morocco itinerary around trains because destinations such as Chefchaouen, Essaouira, Agadir and the Sahara require road transport.
How Do Tourists Buy Train Tickets in Morocco?
You can buy tickets through the official ONCF Voyages website or app, or at the train station. If you prefer an international booking platform, some Morocco routes are also available through third-party services.
Do Morocco Trains Sell Out?
A specific departure or class can fill up, especially on popular Al Boraq services or during busy periods. If you need a particular train or want first class, I recommend booking once your itinerary is fixed.
Does the High-Speed Train Run From Marrakech to Casablanca?
No, not yet. Morocco is extending its high-speed railway toward Marrakech, but travelers currently use conventional ONCF trains between Casablanca and Marrakech.
Is First Class Worth It on Moroccan Trains?
For short journeys, second class is usually enough. On longer routes such as Marrakech to Fes, I would compare the price because the extra space and comfort of first class can be worth paying for.
Can You Take Luggage on Trains in Morocco?
Yes. Normal suitcases and backpacks are fine. You keep responsibility for your own luggage, so I recommend keeping passports, money and electronics in a smaller bag close to you.
Are Trains in Morocco Safe for Tourists?
Yes, I consider trains a generally safe way for visitors to travel between Moroccan cities. Use the same precautions you would in any busy station: keep valuables secure and know how you will reach your accommodation after arriving.
Is There a Train From Marrakech to Agadir?
No. There is currently no passenger train connecting Marrakech and Agadir. For this journey, you will need to continue by bus, rental car or private transport.
Final Advice From a Local Guide
Train travel in Morocco is excellent when the railway matches your itinerary.
I would happily use the train between cities such as Casablanca, Rabat, Tangier, Marrakech, Meknes and Fes. But I would never force a trip through Chefchaouen, the Atlas Mountains, Essaouira or the Sahara around a railway network that does not go there.
Use the train where it saves you time and effort. Use road transport where the journey itself is part of what you came to Morocco to experience.
That combination usually gives you a much better trip.
