Traveling by Train in Morocco: The Complete Guide

If you want an easy, comfortable and affordable way to move between Moroccan cities, take the train. Morocco has one of the best railway networks in Africa, including Al Boraq, the first high-speed train on the continent. Trains are clean, air-conditioned and usually on time, and they let you relax, look at the landscapes and meet Moroccan families on the way. For many of our travelers, a train ride becomes one of their favorite memories of the trip.
We cover traveling by train in Morocco: where the trains go (and where they do not), the different types of trains, classes, prices, how to buy tickets, the night train, the airport train, station tips, and how to combine the train with buses and private transfers to reach the desert, the mountains and the coast.
Train Travel in Morocco at a Glance
| Detail | Info |
|---|---|
| Operator | ONCF, the national railway company |
| High-speed train | Al Boraq, Tangier to Casablanca, up to 320 km/h |
| Classic intercity trains | Al Atlas, to Marrakech, Fes, Meknes, Oujda and more |
| Classes | First class and second class |
| Booking | ONCF website, ONCF app or station ticket office |
| Payment | Card online, cash or card at stations |
| Night train | Tangier to Marrakech, with couchettes |
| Airport train | Casablanca Mohammed V Airport to the city, about 30 minutes to Casa Voyageurs |
| No trains to | Chefchaouen, Essaouira, Agadir, Ouarzazate, Merzouga |
| Comfort | Air-conditioned, generally clean and safe |
A Short History of Trains in Morocco
The first railways in Morocco were built in the early 20th century, during the French and Spanish protectorates, mainly to carry goods like phosphate and to link the ports with inland cities. After independence, the national railway company ONCF was created in 1963 and slowly modernized the network, adding electrified lines, new stations and air-conditioned trains.
The biggest change came in November 2018, when Morocco opened Al Boraq, the first high-speed train in Africa. The trains were built by the French company Alstom, similar to the double-decker TGV trains used in France. Since then, new stations have opened in Tangier, Rabat, Kenitra and Casablanca, and a second high-speed line to Marrakech is under construction.
Where Do Trains Go in Morocco?
Morocco’s railway network has two main lines that cross at the cities of Kenitra and Sidi Kacem:
- North to south: Tangier, Kenitra, Rabat, Casablanca and Marrakech.
- West to east: Rabat and Casablanca to Meknes, Fes, Taourirt and Oujda, with a branch to Nador on the Mediterranean.
- Coastal and local lines: Casablanca to El Jadida and Safi, and frequent shuttles between Kenitra, Rabat, Casablanca and Settat.
- Airport line: Casablanca Mohammed V International Airport to Casablanca.
This covers most of the big cities that travelers visit at the start or the end of their trip. But some of Morocco’s most famous places are not on the rail network at all, including the Sahara Desert, Chefchaouen and Essaouira. We explain how to reach them later in this guide.
Types of Trains in Morocco
Al Boraq: Africa’s First High-Speed Train
Opened in November 2018, Al Boraq runs between Tangier and Casablanca, with stops in Kenitra and Rabat. On the new line between Tangier and Kenitra, it reaches 320 km/h. The trip from Tangier to Casablanca takes about two hours and ten minutes, compared with almost five hours before. The trains are double-decker, modern and very comfortable, with a snack bar, power sockets and big windows.
Al Atlas: Classic Intercity Trains
Al Atlas trains are the classic intercity trains that serve the rest of the network, including Marrakech, Fes, Meknes and Oujda. They are slower but comfortable, with air conditioning. Older trains have compartments with six or eight seats, while newer ones have open carriages.
Shuttles and Regional Trains
Frequent shuttle trains, often called navettes, connect Kenitra, Rabat, Casablanca and Settat, and other regional trains serve smaller towns. They are useful for short trips, like Rabat to Casablanca.
The Night Train
A night train runs between Tangier and Marrakech, with couchette compartments of four beds. It is a great way to cover a long distance while you sleep and save one night in a hotel.
Main Train Routes and Travel Times
These are typical travel times. They can change with the timetable, so always check the ONCF website before your trip.
| Route | Train | Approximate time |
|---|---|---|
| Tangier to Rabat | Al Boraq | About 1 hour 20 minutes |
| Tangier to Casablanca | Al Boraq | About 2 hours 10 minutes |
| Rabat to Casablanca | Al Boraq or shuttle | About 1 hour |
| Casablanca to Marrakech | Al Atlas | About 2 hours 40 minutes to 3 hours |
| Casablanca to Fes | Al Atlas | About 3.5 to 4 hours |
| Rabat to Fes | Al Atlas | About 2.5 hours |
| Fes to Meknes | Al Atlas | About 40 minutes |
| Fes to Marrakech | Al Atlas | About 7 hours |
| Tangier to Fes | Al Atlas or Al Boraq with a change in Kenitra | About 3.5 to 4 hours |
| Tangier to Marrakech | Al Boraq + Al Atlas, or night train | About 5 to 6 hours by day, 10 hours by night |
| Casablanca Airport to Casa Voyageurs | Airport train | About 30 minutes |
The Most Beautiful Train Journeys in Morocco
Trains are not only practical in Morocco; some journeys are lovely too. Choose a window seat and enjoy the view:
- Tangier to Kenitra on Al Boraq: green hills, farmland and glimpses of the Atlantic, all at 320 km/h.
- Rabat to Casablanca: the train crosses the Bouregreg River near Rabat, with views of the old Kasbah of the Udayas and the modern Mohammed VI Tower.
- Fes to Meknes: olive groves, wheat fields and the hills of the Middle Atlas foothills, especially green in spring.
- Casablanca to Marrakech: wide plains that slowly become drier and redder, with the Jbilet hills and, on clear days, the snowy High Atlas in winter as you approach Marrakech.
- Taourirt to Oujda: wide steppe landscapes in eastern Morocco, rarely seen by tourists.
First Class vs Second Class
| Feature | First class | Second class |
|---|---|---|
| Seat | Reserved, numbered seat | Reserved on Al Boraq; on some classic trains seats are not numbered |
| Comfort | Wider seats, more space | Comfortable but busier |
| Crowds | Calmer | Can be crowded on weekends and holidays |
| Price | Higher | Cheaper |
| Best for | Long trips, luggage, peak days | Short trips, budget travel |
Our advice: For long journeys like Fes to Marrakech, or during busy periods like summer, holidays and Fridays, first class is worth the extra money. You get a guaranteed seat and a more peaceful trip. For short hops like Rabat to Casablanca, second class is perfectly fine.
How Much Do Trains Cost in Morocco?
Train travel in Morocco is affordable. Prices depend on the class, the type of train, how early you book and the time of travel, especially on Al Boraq, where prices change with demand. Here are approximate one-way prices to help you plan:
| Route | Second class | First class |
|---|---|---|
| Tangier to Casablanca (Al Boraq) | From about 150 DH | From about 240 DH |
| Casablanca to Marrakech | About 110 to 150 DH | About 170 to 230 DH |
| Casablanca to Fes | About 120 to 150 DH | About 180 to 230 DH |
| Fes to Marrakech | About 200 to 230 DH | About 300 to 350 DH |
| Casablanca Airport to the city | About 50 to 60 DH | About 80 DH |
| Night train couchette, Tangier to Marrakech | About 370 DH and more |
Prices are indicative and can change. Pay attention to the currency: all prices are in Moroccan dirhams. Read our guide to the Moroccan dirham for exchange tips.
How to Buy Train Tickets in Morocco
Online on the ONCF Website or App
The easiest way is to book on the official ONCF website (oncf-voyages.ma) or with the official ONCF app. You choose your stations, date, time and class, pay by card, and receive an e-ticket with a QR code on your phone. Save a screenshot in case you have no internet at the station. Some foreign cards can be refused online; if this happens, try another card or buy at the station.
At the Station
You can also buy tickets at station ticket offices or self-service machines in big stations. Payment by cash is always accepted, and cards are accepted in most big stations. Arrive early on busy days, as queues can be long, especially on Friday afternoons, Sunday evenings and before holidays.
When to Book
- Al Boraq: book a few days in advance for the best prices and seats, especially on weekends.
- Al Atlas: you can often buy on the day, but book ahead in summer and around holidays.
- Night train couchettes: book as early as possible, as places are limited.
- Eid holidays: book early, because many Moroccans travel to their families.
Popular Train Routes for First-Time Visitors
Casablanca to Marrakech
This is one of the most popular routes for travelers who land in Casablanca. Trains leave Casa Voyageurs regularly through the day and take about 2 hours 40 minutes to 3 hours. The landscape changes from green farmland to dry red plains as you go south. Marrakech station is in the modern Gueliz district; from there, a petit taxi to the medina takes about 10 minutes. Choose first class in summer and on weekends, when trains are full.
Fes to Marrakech
Direct Al Atlas trains connect Fes and Marrakech in about seven hours, passing through Meknes, Rabat and Casablanca. It is a long day, but comfortable in first class, and much easier than driving if you do not want to go through the desert. Bring lunch, water and a book. Many travelers prefer to break the trip with a night in Rabat or Casablanca. If you want to see the Sahara between Fes and Marrakech, a desert tour is a much better option than the train.
Tangier to Fes
You have two options: a direct classic train in about four hours, or Al Boraq from Tangier to Kenitra and then a classic train to Fes, which can be a little faster depending on the connection. Both are good. The direct train is simpler, with no change and no rush to catch a connection. From Fes station, a petit taxi to the old medina takes about 15 minutes.
A Day Trip From Casablanca to Rabat
Rabat is only about one hour from Casablanca by train, making it a perfect day trip. Take an early train to Rabat Ville, which is in the city center, visit the Kasbah of the Udayas, the Hassan Tower and the Mausoleum of Mohammed V, and come back in the evening. Rabat is calm, clean and easy to explore on foot or by tram. From Fes, you can also join our day trip from Fes to Rabat.
Train Travel During Ramadan and Holidays
Trains keep running during Ramadan and public holidays, but there are a few things to know. During Ramadan, Morocco usually moves its clocks back one hour, and timetables may change, so always check the time on your ticket. Around sunset, the trains are quieter because people break their fast; you may even be offered a date or a piece of bread by friendly passengers.
The busiest days of the year are before and after Eid al-Fitr and Eid al-Adha, when millions of Moroccans travel to visit their families. Trains are often fully booked, stations are crowded and queues are long. If your trip falls during these days, book your tickets as early as possible and choose first class. Summer weekends, especially to the coast and the north, are also busy.
The Night Train: Tangier to Marrakech
The night train is a classic experience. It usually leaves in the evening and arrives the next morning. The couchette car has compartments with four beds, sheets and a pillow, and the compartments are shared. If you are a couple or a group of four, you can sometimes book a whole compartment. There is also a cheaper option to travel seated, but it is much less comfortable for a whole night.
- Book your couchette early and check the exact time on your ticket.
- Bring water, snacks and a light layer for the air conditioning.
- Keep your valuables close to you at night.
- Use the time zone carefully: train times follow Moroccan time.
The Casablanca Airport Train
If you land at Casablanca Mohammed V Airport, the train is a cheap and easy way to reach the city. The station is under the terminal, and trains usually run about every hour. The trip to Casa Voyageurs takes about 30 minutes; some trains continue to Casa Port, closer to the city center and the old medina. From Casa Voyageurs, you can change to Al Boraq to Rabat and Tangier, or to trains to Marrakech and Fes. Read our guides to the Casablanca international airport and Casablanca airport transfers.
Main Train Stations in Morocco
| City | Main station | Tip |
|---|---|---|
| Casablanca | Casa Voyageurs | The main hub for Al Boraq, Marrakech and Fes trains |
| Casablanca | Casa Port | Closest to the city center and the old medina |
| Rabat | Rabat Agdal and Rabat Ville | Al Boraq stops at Rabat Agdal |
| Tangier | Tanger Ville | Modern station near the beach and city center; see where is Tangier |
| Marrakech | Marrakech station | In Gueliz, about 10 minutes by taxi from the medina |
| Fes | Fes station | In the new town, about 15 minutes by taxi from Fes el-Bali |
| Meknes | Meknes Amir Abdelkader and El Amir | Close to the new town |
What Trains Are Like on Board
- Air conditioning: available on main lines, sometimes very strong, so bring a light layer.
- Food: Al Boraq has a snack bar. On other trains, a trolley may sell drinks and snacks, but bring your own water and food for long trips.
- Toilets: available on all main trains, but bring tissues.
- Luggage: racks above the seats and at the ends of the carriages. There are no strict luggage weight limits like on planes.
- Wi-Fi and sockets: power sockets on Al Boraq; Wi-Fi is not always available or reliable.
- Atmosphere: families, students and business travelers. People are friendly and often happy to chat.
From the Train Station to Your Riad
Many travelers stay in riads inside the medina, where cars cannot enter. Here is how to get from the station to your door:
- Take a petit taxi from the official taxi rank and ask the driver to use the meter, or agree on the price before you go.
- Ask your riad for the nearest gate or parking spot, and send the address or location to the driver.
- Ask your riad to meet you at the medina gate. Many riads send someone to guide you, which avoids getting lost.
- Use a porter with a cart for heavy luggage in the medina, and agree on a small price first.
- Book a private transfer if you arrive late at night or with a lot of luggage.
Train Travel for Families, Seniors and Travelers With Reduced Mobility
Trains are a great option for families and seniors because you can move, use the toilet and stretch your legs, unlike on long bus rides. Children under a certain age travel free or at a reduced price, and ONCF offers discount cards for young people and seniors who travel often. Big modern stations like Tanger Ville, Rabat Agdal, Kenitra and Casa Voyageurs have elevators and escalators, and Al Boraq has spaces for wheelchairs. Older stations and classic trains can have steps, so ask station staff for help if you need it.
Safety and Etiquette on Moroccan Trains
- Keep your bags close, especially in busy stations and on night trains.
- Offer your seat to older people, pregnant women and parents with small children.
- Be discreet during Ramadan: try not to eat or drink openly during the day out of respect for people who are fasting.
- Ignore unofficial “helpers” at stations who offer to carry bags or find taxis and then ask for money.
- Use official taxis outside the station and insist on the meter.
- Keep your ticket until the end of the trip, as inspectors check tickets on board.
Where Trains Do Not Go and How to Get There
| Destination | How to get there | Tip |
|---|---|---|
| Sahara (Merzouga, Zagora) | Private tour, long-distance bus or car | A desert tour from Marrakech or Fes is the easiest way |
| Chefchaouen | Bus or private transfer from Fes or Tangier | About 3 to 4 hours from Fes |
| Essaouira | Supratours or CTM bus from Marrakech | About 3 hours |
| Agadir | Bus from Marrakech | About 3 to 3.5 hours |
| Ouarzazate and Aït Ben Haddou | Bus, tour or private transfer from Marrakech | Over the High Atlas, about 4 hours |
| Atlas villages (Imlil, Ourika) | Taxi, transfer or day trip from Marrakech | About 1 to 1.5 hours |
ONCF works with the bus company Supratours, so you can sometimes buy a combined train and bus ticket, for example to Essaouira or Agadir via Marrakech. For the desert, mountains and villages, most travelers prefer a private tour with a driver, which saves time and lets you stop wherever you want.
Train vs Bus vs Private Driver in Morocco
| Option | Best for | Pros | Cons |
|---|---|---|---|
| Train | Big cities | Comfortable, safe, affordable, no traffic | Does not reach the desert, mountains or many towns |
| Bus (CTM, Supratours) | Places without trains | Cheap, many routes | Slower, fixed times |
| Private driver or tour | Desert, mountains, flexible trips | Door-to-door, stops anywhere, local knowledge | More expensive than public transport |
| Domestic flights | Very long distances | Fast | Airports far from centers, limited routes |
The smartest plan for many travelers is to mix them: take the train between the big cities and book a private tour for the Sahara and the Atlas Mountains. This way, you save money on the easy routes and save time on the long, complicated ones. A private driver can also pick you up directly at the train station with a sign with your name, so you never have to look for a taxi with heavy bags. It is the most relaxed way to combine comfort, flexibility and budget, and it lets you see both modern Morocco and the wild landscapes that no railway will ever reach.
Best Time of Year to Travel by Train in Morocco
You can travel by train in Morocco all year round, but the experience changes with the seasons. Spring and autumn are the most pleasant: the countryside is green in spring, temperatures are mild, and trains are comfortable. Summer is the busiest season, with many Moroccan families traveling to the coast, so trains are often full and the air conditioning works hard against the heat inland. Read our guide to the weather in Morocco in August if you plan a summer trip.
Winter is quiet and a great time for city hopping by train, as long as you bring a warm layer for cool stations and early mornings. For a full overview, see our guide to the best time to visit Morocco.
The Future: High-Speed Train to Marrakech
Big changes are coming. In April 2025, construction began on a new 430 km high-speed line from Kenitra to Marrakech, passing through Rabat and Casablanca and serving the airports of Rabat and Casablanca. The plan is to open it by the end of 2029, before the 2030 FIFA World Cup hosted by Morocco, Spain and Portugal. When it opens, the trip from Tangier to Marrakech should become much faster, and a faster service between Fes and Marrakech is also planned. Studies for a future extension from Marrakech to Agadir have also been completed.
Sample Itinerary by Train and Tour
| Day | Route | Transport |
|---|---|---|
| Day 1 | Arrive in Casablanca, visit the Hassan II Mosque | Airport train |
| Day 2 | Casablanca to Rabat for the day, then to Tangier | Al Boraq |
| Day 3 | Tangier to Chefchaouen | Private transfer or bus |
| Day 4 | Chefchaouen to Fes | Private transfer or bus |
| Day 5 | Fes medina, optional trip to Meknes and Volubilis | Train or tour |
| Days 6 to 8 | Fes to the Sahara and on to Marrakech | Private desert tour |
| Day 9 | Marrakech, then train to Casablanca for your flight | Al Atlas + airport train |
Want to visit Meknes and Volubilis from Fes? See our day trip from Fes to Meknes and Volubilis.
12 Essential Tips for Traveling by Train in Morocco
Our team takes trains in Morocco all the time. These are the 12 tips we share with every traveler:
- Book Al Boraq early for the best prices, especially on weekends.
- Use the official ONCF website or app and save your e-ticket offline.
- Check the station name carefully: Casa Voyageurs or Casa Port, Rabat Agdal or Rabat Ville.
- Choose first class for long journeys and busy days.
- Arrive 20 to 30 minutes early to find your platform and carriage.
- Bring water and snacks for long trips on classic trains.
- Pack a light jacket, because the air conditioning can be strong.
- Travel light or use luggage racks near your seat.
- Avoid Friday afternoons and Sunday evenings if you want quieter trains.
- Book couchettes early for the night train.
- Combine train and tour: train between big cities, private driver for the desert and mountains.
- Double-check times during Ramadan, when Morocco changes its clocks.
Common Mistakes When Taking the Train in Morocco
| Mistake | Fix |
|---|---|
| Going to Casa Port for Al Boraq | Al Boraq leaves from Casa Voyageurs |
| Not checking the station name | Rabat and Casablanca have several stations |
| Buying second class on busy days | Choose first class for a guaranteed seat |
| No water or food on long trips | Bring your own supplies |
| Planning a train to the desert | There are no trains to Merzouga; book a tour or bus |
| Missing the train because of the clock change | Check the time during Ramadan, when Morocco changes time |
| Arriving at the last minute | Arrive 20 to 30 minutes early, especially to buy tickets |
Quick Cheat Sheet: Traveling by Train in Morocco
- Operator: ONCF
- High-speed: Al Boraq, Tangier to Casablanca in about 2h10
- Classic trains: Al Atlas to Marrakech, Fes and Oujda
- Book: ONCF website or app, or at the station
- Choose first class on long or busy trips
- Night train: Tangier to Marrakech
- No trains to the desert, Chefchaouen or Essaouira
- High-speed to Marrakech planned by the end of 2029
Frequently Asked Questions About Trains in Morocco
Are trains in Morocco safe?
Yes. Trains are one of the safest and most comfortable ways to travel in Morocco. Keep an eye on your bags, as in any country.
Is the train in Morocco comfortable?
Yes. Main trains are air-conditioned and comfortable, and Al Boraq is modern and fast.
How do I buy train tickets in Morocco?
Online on the ONCF website or app, or at the station ticket office or machines.
Is there a train from Marrakech to Fes?
Yes. Direct Al Atlas trains take about 7 hours.
Is there a train to the Sahara Desert?
No. To reach Merzouga or Zagora, take a tour, a bus or a private driver.
Is there a train to Chefchaouen?
No. Take a bus or private transfer from Fes or Tangier.
How fast is Al Boraq?
Up to 320 km/h between Tangier and Kenitra.
Can I take the train from Casablanca airport?
Yes. A train connects the airport to Casablanca in about 30 minutes to Casa Voyageurs.
Should I choose first or second class?
First class for long trips and busy days; second class is fine for short journeys.
Is there a night train in Morocco?
Yes, between Tangier and Marrakech, with couchettes.
Do I need to print my train ticket in Morocco?
No. An e-ticket with a QR code on your phone is usually accepted. Save a screenshot in case you have no internet.
Are Moroccan trains on time?
Al Boraq is usually very punctual. Classic trains are generally reliable but can have delays, especially on long routes.
Final Thoughts
Traveling by train in Morocco is easy, affordable and comfortable. Ride Al Boraq at 320 km/h along the Atlantic, watch the countryside go by on the way to Marrakech or Fes, and sleep on the night train from Tangier. Then, for the places the railway cannot reach, like the golden dunes of the Sahara and the villages of the Atlas, add a private tour to complete your journey. With a little planning, the train will become one of the easiest and most pleasant parts of your Moroccan adventure.
Want to combine the train with a desert adventure? Contact us and we will meet you at the train station in Marrakech, Fes or Tangier and take you to the Sahara.
Explore our Morocco trips:
Tours from Marrakech: Arrive by train in Marrakech and let our driver pick you up at the station. From there, we cross the High Atlas to the kasbahs and the Sahara, places no train can reach.
Morocco Desert Tours: The railway stops in the big cities, but the magic of Morocco continues in the desert. We take you from the station to the dunes of Merzouga for a camel ride and a night under the stars.
Tours from Fes: Reach Fes comfortably by train from Casablanca, Rabat or Tangier, then join a private tour through the Middle Atlas to the Sahara and on to Marrakech.
Tours from Ouarzazate: There is no train to Ouarzazate, so we bring you there by road over the spectacular Tichka pass, then on to the Dades and Todra gorges and the desert.
Tours from Tangier: Take Al Boraq or arrive by ferry in Tangier, and let us drive you to Chefchaouen, Fes and the Sahara on a route the railway cannot follow.
Tours from Casablanca: Land at Casablanca airport, take the train into the city, and start a private tour that combines the comfort of the railway with the freedom of the open road.
Contact us

Your Local Experts
Our Moroccan team organizes private tours from every major city in Morocco: Marrakech, Fes, Casablanca, Tangier, Rabat, Agadir, Ouarzazate and more. Wherever you land, we pick you up and design your trip around your dates and interests.
Plan Your Trip
Click any destination to see more:
Marrakech Desert Tours
- 2 Days Desert Tour from Marrakech
- 3 Days Marrakech to Merzouga
- 3 Days Marrakech to Fes
- 4 Days Marrakech to Merzouga
- 4 Days Marrakech to Fes
- 5 Days Marrakech to Merzouga
- 5 Days Morocco Tour from Marrakech
- 6 Days Morocco Tour from Marrakech
- 7 Days Morocco Tour from Marrakech
- 8 Days Morocco Tour from Marrakech
- 8 Days with Imperial Cities
- 9 Days Morocco Tour from Marrakech
- 10 Days Morocco Tour from Marrakech
- 12 Days Morocco Tour from Marrakech
- 14 Days Morocco Tour from Marrakech