Traveling by train in Morocco is another pleasant way to travel across the country. The train network in Morocco is not extensive, but many of the tourist destinations are covered. The trains run between Marrakech, Rabat, Casablanca, Oujda, Tangier, Fez and Meknes. If you are planning to visit the desert or Essaouira, you must take a coach, a rental car or a taxi to your destination.

You can purchase your train ticket online on the ONCF’s website or at the train station. Trains run daily and there is no problem to book a trip beforehand.  Tickets can be purchased up to a max of 30 days in advance of the date of your trip.

Table of Contents

The carriages are divided into a first and second class, as is the case in many countries. The vital difference between the first and second class trains in Morocco is that in first class you will receive a reserved chair while the second class does not, and whether the train is (often) complete , you may be left standing in the corridor with your luggage until there’s a free chair. Since the fact that the prices are extremely reasonable, I would recommend choosing the first class, as I personally do.

ONCF Train Station

Between 2010 and 2017 ONCF has modernized more than 40 stations. In accordance with this new concept, these buildings integrate harmoniously with the planning environment of cities and place themselves as spaces that offer services to meet the expectations of visitors and travelers.
These buildings comprise all the necessary and are home to purchasing facilities offering multiple services in addition to routine travel tasks (ticketing, waiting rooms, cafes, restaurants, mosques, shopping brands…) and outdoor amenities harmoniously integrated with their surroundings: esplanades, green spaces, taxi stands, car parks.

Following are some travel times to give a good notion of how long does the trip takes to your destination: 

  • From Marrakech to Casablanca: 3 hours 20 minutes
  • From Marrakech to Rabat: 4 hours 53 minutes
  • From Marrakech to Meknes: 7 hours 19 minutes
  • From Marrakech to Fes: 8 hours 5 minutes
  • From Marrakech to Tanger: 9 hours 26 minutes

Photo credits: ONCF

Join us on a Moroccan adventure!

Join countless satisfied travelers who have experienced Morocco with us. We customize every detail to make your Moroccan adventure uniquely yours. Explore the Magic of Morocco with us!