Trains were my favorite way to travel around Morocco. I felt very safe using them, enjoyed being able to settle into a seat, and liked how easily they connected the cities I wanted to visit.

They were especially useful while I was staying in Rabat. I could visit other cities without renting a car or haggling over a fare.

A few things are worth knowing before your first trip, especially how to choose the right station and find your seat.

Morocco Train Routes: Where Can You Go?

ONCF runs Morocco’s trains. Its Al Boraq high-speed service links Tangier, Kenitra, Rabat Agdal, and Casa Voyageurs. Al Atlas trains run between cities on regular railway lines, including Marrakech, Casablanca, Rabat, and Fes. Local trains are useful for shorter trips.

Use the station names below when searching for tickets. Marrakech and Marrakesh are the same city. ONCF uses Marrakech in its timetables.

JourneyStations to searchTrain and changes
Tangier–CasablancaTanger Ville to Casa VoyageursDirect Al Boraq
Tangier–RabatTanger Ville to Rabat AgdalDirect Al Boraq
Casablanca–MarrakeshCasa Voyageurs to MarrakechDirect Al Atlas
Rabat–MarrakeshRabat Agdal to MarrakechDirect Al Atlas
Casablanca–FesCasa Voyageurs to FèsDirect Al Atlas
Tangier–MarrakeshTanger Ville to MarrakechAl Boraq, then change to Al Atlas. Check where to change when booking.

Check trains for your travel date on ONCF Voyages. ONCF’s Marrakech–Fes timetable also shows the Al Atlas routes, but track work and schedule changes can affect your trip. If you book Al Boraq to reach Marrakech, check where you need to change trains.

How to Book Morocco Train Tickets

I tried other ticket websites, but I didn’t think they were worth using. ONCF’s own website worked better for me, and the tickets I compared were much cheaper when booked directly. I would start with the official ONCF booking site.

Booking from outside Morocco? The official ONCF website may not open. Some travelers have trouble accessing it from abroad, possibly because the site blocks certain internet addresses (IPs). This doesn’t affect everyone. If it won’t load, try again once you’re in Morocco or buy at a station ticket office. It doesn’t mean the train is sold out.

  1. Enter your stations and travel date. Check the station names, especially in Casablanca and Rabat.
  2. Choose a train. Compare departure times, total travel time, and whether you need to change trains.
  3. Compare first and second class. The extra cost of first class varies, so check both prices for your train.
  4. Check the details before paying. Make sure your name and travel details are right. Check the seating options and whether you can change or refund the ticket.
  5. Save your ticket on your phone. Make sure you can open it without internet access. You’ll need it to find your seat and show staff.

You can also buy tickets at the station if the website or your payment doesn’t work. Still, I recommend booking online as soon as you know your plans. You can reserve your seat while tickets are available and skip the ticket counter. Don’t leave an important trip until the last minute, especially around holidays or busy weekends.

Ticket Prices and Journey Times

There isn’t one fixed price for each route. ONCF explains that Al Boraq fares vary with demand and departure time. The class and the rules for changes and refunds can also affect the price.

For example, ONCF’s Yalla offer page advertises Al Boraq promotional tickets at 89 MAD in second class and 129 MAD in first class. MAD means Moroccan dirhams. These are special offers, not guaranteed prices for your trip. You need to book ahead, and only a limited number of tickets are available at these prices. Check the price and offer rules for your date before planning your budget.

Travel times also vary. ONCF has advertised Tangier–Casablanca in about 2 hours 10 minutes on Al Boraq. For comparison, ONCF’s timetable shows trains taking 3 hours from Marrakech to Casa Voyageurs and 4 hours to Rabat Agdal. These older examples give you a rough idea of travel times. Check the time shown when you book, including any wait between trains, before making other plans.

Choosing the Right Station

Some cities have more than one station. Check which one your train uses and how far it is from where you’re staying.

  • Casablanca: Casa Voyageurs and Casa Port are different stations. Check which one your train uses.
  • Rabat: Rabat Ville and Rabat Agdal serve different parts of the city. Check where your train stops and which station is closer to where you’re staying.
  • Marrakesh: The station is outside the medina (old town). Plan how you’ll get from there to your accommodation.
  • Mohammed V Airport: You can travel from the airport by train. Check whether you need to change trains to reach your destination.

Save the station in your map before leaving. That helps avoid telling a driver only the city name and discovering you meant a different place.

I also found the stations beautiful. Take a moment to enjoy Marrakech’s grand entrance, with its patterned arch and glass front, before heading inside.

Marrakech railway station entrance with a large patterned arch, glass doors, and a Moroccan flag
The beautiful entrance to Marrakech station, photographed during my travels. Photo by Phil.

First or Second Class: Which Would I Choose?

I recommend first class if your budget allows it. On my trips, it didn’t cost much more and gave me more space in a much less crowded carriage. That mattered especially when I was moving between cities with all my nomad luggage.

I also traveled in second class and had no issues. It’s a good choice if you’d rather save money. How busy each class is, and how much more first class costs, will depend on your train and date.

  • First class: my choice for more space and a quieter carriage, especially on longer trips.
  • Second class: worked well for me too, but felt more crowded on the journeys I took.
  • Either class: follow the carriage and seat details on your ticket. Only sit in first class if your ticket is for first class.

Al Boraq and Al Atlas are train services. Both offer different classes, so check the class as well as the train name when booking. ONCF’s Al Atlas guide explains reservations. Its Al Boraq booking guide explains the seat options.

On Al Boraq, first-class options include single window seats and pairs facing each other. Both classes offer pairs of seats next to each other, when available. If you want to sit together, check the options before paying or ask at the ticket office.

Understanding Your Ticket and Seat

Check the train number, date, departure time, class, carriage, and seat information before heading to the platform. On a ticket in French, voiture means carriage (train car) and place means seat.

If your ticket has a seat number, look for the carriage first and then the seat number inside. The same number can appear in a different carriage, which is an easy source of confusion.

On almost every journey I took, someone was already sitting in my assigned seat. It felt like a common habit on those trips: people would sit in an available place and move when the ticket holder arrived. Having to ask each time was a bit annoying, but everyone was polite, and people were helpful when I had questions. I wouldn’t stress over it.

Check your carriage and seat number first, then politely show your ticket and ask the person to move. If there is any confusion, ask the conductor for help. An empty seat may belong to someone getting on later.

Stay in the class you’ve paid for. My ticket was checked very frequently, on almost every trip, as I remember it. Don’t move into a different class just because there is an empty seat.

The ONCF Al Atlas guide shows how to read your ticket. Check prices and ticket rules when you book.

At the Station

Arrive with enough time to find the right entrance and platform, especially on your first journey. Check the departure board rather than relying only on a platform someone mentioned earlier.

ONCF departure board showing departure times, destinations, platforms, and train numbers in French and Arabic
A departure board from my trip. Use it to see what the board looks like, not to check today’s train times. Photo by Phil.

Keep your phone charged and your ticket saved so you can open it without internet access. If your ticket requires ID, bring the document you used to book.

Stations usually have places to eat lunch or buy water and snacks, especially the larger ones. Give yourself time to grab something before boarding without rushing for the train.

You can also buy food and drinks on Al Boraq: ONCF lists an onboard food service. Don’t count on the same options on every train, though. I’d still bring water and a snack, especially for a longer trip.

Luggage and Comfort

I traveled with my full nomad luggage when moving from one city to another and had no issues. The trains I used had space for bags, which made moving between cities easy.

A large black and yellow travel bag and a suitcase stored on an overhead train luggage rack
Luggage storage on one of the trains I took while moving between cities. Photo by Phil.

Make sure you can carry your own bags through the station and onto the train. Use the luggage racks and keep the aisle clear. Space can be limited, so check ONCF’s luggage rules if you have very large bags.

I would keep my passport, laptop, phone, and other valuables close rather than placing everything in one unattended bag. A small day bag makes that easier.

Bring a light sweater and a power bank. Don’t count on a working power socket or reliable internet if you need to work on the train.

Is Train Travel in Morocco Safe?

I felt very safe on the trains and found them a comfortable way to move around. That’s one reason I recommend them.

Use the same sensible habits you would elsewhere: keep track of your bags, book through ONCF, and know how you will get from the arrival station to your accommodation.

People were polite and helpful when I had questions, including during those repeated seat mix-ups. That made the small problems easier to deal with.

Traveling During Ramadan

Train times and food opening hours can change during Ramadan. Check them for the day you plan to travel.

I visited Morocco during Ramadan and found the experience varied by place. Rather than assuming everything will be either open or closed, ask about your specific journey and bring what you need.

Be considerate toward people who are fasting. You don’t need to share someone’s religious practice to respect it.

Changes, Delays, and Connections

Before paying, check whether you can change your ticket or get a refund. If your plans change, contact the seller you booked with. Changing a ticket may cost extra.

Leave plenty of time between your train and a flight or another booking you can’t miss. Don’t make plans that only work if the train arrives exactly on time.

Which Cities Would I Combine?

Rabat was my favorite base. I spent two months there and loved the restaurants, parks, and everyday atmosphere. Casablanca worked well for a shorter stay, while Marrakesh had plenty to see but was more touristy than I personally enjoyed.

Taking the train made it easy to visit all three without driving. Choose the places you want to see, decide how long to stay, and then check the trains between them.

Rabat Travel Ultimate Guide - Everything You Need to Know
Rabat Travel Ultimate Guide - Everything You Need to Know

Why Rabat became my favorite Moroccan city, and what to know before a longer stay.

Casablanca Travel Ultimate Guide - Everything You Need to Know
Casablanca Travel Ultimate Guide - Everything You Need to Know

My three-week stay, practical city advice, and visiting Hassan II Mosque.

Marrakesh Travel Ultimate Guide - Everything You Need to Know
Marrakesh Travel Ultimate Guide - Everything You Need to Know

The medina, a quieter traditional stay, and my honest experience of the city's tourist scene.