Trains in Morocco: The Complete Guide (2026)

Welcome to our big guide about trains. Many people ask how to move between cities here. The train is a very nice way to see the country. Here is a simple table of contents so you can jump to what you need:

Can you travel Morocco by train?

Yes. Morocco has a very reliable intercity rail network operated by ONCF. This includes the fast Al Boraq high-speed line from Tangier to Casablanca, and also conventional trains that connect many other major cities.

For places where the train does not go, the ONCF company has a bus called Supratours that connects with the train stations.

  • Best for: Casablanca, Rabat, Tangier, Kenitra, Fes, and Marrakech.
  • Not best for: The deep Sahara desert or small mountain towns. You usually need a bus or car after the train stops.

Morocco train types explained (Al Boraq vs Al Atlas)

Trains in Morocco

When you look at trains here, you will see two main names. It is good to understand the difference.

Al Boraq (high-speed train)

Al Boraq is the very fast modern train. It is actually the first high-speed train in all of Africa. It is for people who want to travel fast between the big cities on the coast. It is very clean, it has air conditioning, and it is very comfortable.

The main route for Al Boraq goes from Tangier in the north, down to Kenitra, then Rabat, and finishes in Casablanca. It does not go to Marrakech or Fes. If you take this train, you will save a lot of time.

Conventional trains (Al Atlas)

The normal trains are often called Al Atlas services. They are a little slower but they go to more places. When conventional is the only option, like going from Casablanca to Marrakech or Fes, this is what you take.

The comfort is still very good. They have air conditioning too, but sometimes in the summer it is not very strong. The seats are nice, and you can see beautiful landscapes from the window when the train moves slowly through the countryside. You can check times on the official ONCF website.

Morocco train map (what connects by rail)

The train lines connect the most important cities. It makes a shape like a big letter “Y” on the map.

Here are the main tourist routes that connect by rail:

  • Tangier ⇄ Rabat ⇄ Casablanca (high-speed options on this corridor)
  • Casablanca ⇄ Marrakech (popular conventional route)
  • Casablanca/Rabat ⇄ Fes (goes through Meknes)
  • Fes ⇄ Meknes (very short hop)

If you plan how many days do I need in Morocco, you can use these train lines to easily connect 3 or 4 big cities in one week.

Best train routes for tourists in Morocco

Here are the best journeys you can take when you visit.

Tangier ↔ Rabat/Casablanca

  • Why go: It is the fastest way to travel the coast. You can see the ocean and it is very smooth.
  • Approx time: About 1 hour and 20 minutes to Rabat, or 2 hours to Casablanca.
  • Ticket tip: Book this early because Al Boraq gets full quickly, specially in the morning.

Casablanca ↔ Marrakech

  • Why go: This is the classic route. It takes you from the big modern city to the old red city of Marrakech.
  • Approx time: About 2 hours and 40 minutes.
  • Ticket tip: There are many trains every day, almost every two hours. You can read our guide on things to do in Marrakech while you sit on the train.

Fes ↔ Rabat/Casablanca

  • Why go: It is very good value to see the old historical capital and the new modern capital.
  • Approx time: About 3 hours to Rabat, and 4 hours to Casablanca.
  • Ticket tip: Take a morning train so you can see the green farms from the window.

Day trips by train

  • Why go: You can sleep in one city and visit another city for just one day without moving your bags.
  • Examples: Rabat to Casablanca is only 1 hour. Fes to Meknes is only 40 minutes.
  • Ticket tip: You can buy a return ticket at the station on the same day for these short trips.

How to buy train tickets in Morocco (online + station)

Buying tickets is very easy now, but you need to know a few things.

Buy online (recommended)

The best way is to use the official ONCF Voyages booking site. You can choose English language. You need to put your name and email. They will send you an e-ticket with a QR code. You do not need to print it, just show your phone to the man on the train. For Al Boraq and 1st class, buying online gives you a guaranteed seat number.

Buy on arrival (ticket counter + kiosks)

You can go to the station and buy from the ticket window or the self-service machines.

  • When it’s fine: This is okay for short routes or if you travel in the middle of the week.
  • When it’s risky: Do not do this on weekends, national holidays, or for the Al Boraq high-speed train, because tickets will be sold out and you will wait a long time.

ONCF mobile app

There is an app called “ONCF Trafic”. It is very helpful.

  • It shows the train times live.
  • It tells you if a train is late.
  • It works in French and Arabic, but it is easy to understand the numbers and station names.

Train classes in Morocco (1st vs 2nd)

Many people ask if they should pay more for first class. Here is a simple comparison.

Feature1st Class2nd Class
Seat comfortBigger seats, more leg room. 6 people in a cabin.Normal seats. 8 people in a cabin (on older trains).
Crowding riskVery low. No standing allowed.Can be very crowded. People might stand in the hall.
Assigned seatsYes, you always get a specific seat number.Only on Al Boraq. On older trains, you sit where you find space.

Who should choose which: First class is nice if you have long legs or want quiet time. The price difference is small, maybe just 40 or 50 dirhams more. Second class is good if you want to save money and talk with local people. Just remember, experiences vary by train type, but both are very safe and clean.

When to book trains in Morocco (and how far ahead)

You do not need to book months before, but planning a little bit is good.

  • High-speed + peak travel: Book the Al Boraq train 1 or 2 days early, or even a week before if it is a holiday.
  • Regular routes: Sometimes same-day buying is ok for Al Atlas trains.
  • Best prices: ONCF gives cheaper prices if you book a few days before your travel day.

Luggage rules and what to do with big bags

Most train posts forget to talk about bags, but it is important for travelers.

  • Typical storage: There are racks above your head for small bags. For big heavy suitcases, there is a space at the end of the train carriage near the doors.
  • Best practices: Try to arrive early so you can find a good space for your bag. Do not block the aisles where people walk. Keep your small bag with your passport and money on your lap or close to you. Do not leave valuables in the big bag by the door.

Stations in Morocco: what to expect + arrival timing

The main train stations in cities like Marrakech, Rabat (Agdal), and Casablanca (Casa Voyageurs) are very big, new, and look like small airports.

How early to arrive

You should arrive 30 minutes before your train leaves. If you need to buy a ticket at the station, arrive 45 minutes or 1 hour early because the line can be long.

Finding platforms + boarding

Look at the big electronic screens. They show the train number, destination, and the platform number (called “Voie” in French). Sometimes they announce it just 10 minutes before.

Station safety basics

Stations are very safe. There are police and guards. Just watch out for people offering to carry your bag for money. A polite “No thank you” is enough.

Food, bathrooms, and facilities

Big stations have cafes, fast food, and small shops to buy water and snacks. The bathrooms in the new stations are very clean and usually cost 2 or 3 dirhams to enter.

Is the train safe in Morocco?

Yes, the train is very safe. Families, women traveling alone, and tourists use it every day without problems. You can read our general guide on is it safe to travel to Morocco right now for more information.

For the train, just use normal pickpocket precautions. When you get on and off, hold your phone and wallet inside your pocket. If you travel at night, try to sit in a cabin with other families. Do not sleep deeply with your phone on the table.

Common train travel mistakes (and how to avoid them)

Here are mistakes tourists make, so you can learn from them:

  • Choosing the wrong station name: Big cities have two stations. Casablanca has “Casa Port” and “Casa Voyageurs”. Rabat has “Rabat Ville” and “Rabat Agdal”. Make sure you check your ticket to know which one to go to!
  • Not checking seat/class on ticket: Look at your ticket. “Voiture” means the carriage number, and “Place” means your seat number. Do not sit in 1st class with a 2nd class ticket, the inspector will give you a fine.
  • Underestimating transfer time: If you change trains, give yourself at least 20 minutes between them, because sometimes the first train is a little late.

Alternatives when trains don’t go where you need

Trains do not go everywhere. If you want to go to the Sahara desert or Chefchaouen, you need something else.

  • Supratours and CTM buses: Supratours is owned by the train company. You can buy a ticket that combines the train and the bus. CTM is another very good and clean private bus company.
  • Private drivers and rental cars: If you want more freedom, you can read our advice on should I rent a car in Morocco or just hire a private taxi between cities.

Quick FAQ

Do trains run on Fridays?

Yes, trains run normally every day, including Fridays and Sundays. They do not stop for prayer time.

Can I buy tickets with a foreign card online?

Yes, the ONCF website accepts international Visa and Mastercard now. Sometimes you need to try two times if your bank asks for a code.

Are there toilets on trains?

Yes, all trains have toilets at the end of the carriage. It is a good idea to bring a small tissue paper with you.

Is first class worth it?

Yes, if you want guaranteed space for your legs and a more quiet trip, the small extra price is very worth it.

What’s the best route for a first-time visitor?

The high-speed train from Tangier to Casablanca, and then the normal train to Marrakech. It is very easy for a first time.

Quick itinerary ideas using trains

5 days “cities by rail”

Arrive in Casablanca. Take the train to Rabat (1 hour). Stay two days. Take the fast train to Tangier (1.5 hours). Stay two days and fly out from Tangier.

7 days “north-to-south with Marrakech”

Start in Fes. Take the train to Rabat to see the ocean. Next day, train to Casablanca to see the big Mosque. Then take the train down to Marrakech for your last 3 days in the red city.