Morocco has one of the largest and most modern rail networks on the African continent, making it a convenient choice for tourists to get around the country.
There are two major rail lines that run through Morocco. The north-south lines starts in Tangier and goes to Marrakech, and the east-west route starts in Oudja and goes to Sidi Kacem, where it intersects the Tangier-Marrakech line.
If you are traveling to Rabat, Casablanca, Fes, Marrakech, Tangier, Oujda or Meknes, you are covered by a direct stop.
Train tickets can not be purchased online nor purchased outside of Morocco, so you’ll need to allow some time to get your tickets in person.
You can purchase them from all of the major train stations and also make reservations in advance for other stops if you are going to multiple cities.
Combined tickets are also allowed for rail and bus travel for destinations beyond where the track stops (such as Agadir or Essaouira).
Trains in Morocco are divided up into first and second class compartments.
In the first class section, there are six people to a compartment, and in second class there are eight people to a compartment.
It’s recommended to purchase the first class ticket as it allows you to pick an actual seat, allowing you to get a window seat to see the beautiful countryside.
Second class seating is on a first come first serve basis, and the cost difference between them isn’t that much.
You can usually buy tickets the day of, but sometimes trains can be full and you might have to wait for the next train to leave.
If you are traveling around Eid holidays, make sure to get them early as trains can be packed during this time.
Make sure you know the exact time of your arrival or departure, as signs tend to not be well posted in the train schedules.
The full train schedule can be found here in French on the ONCF website, and if you’re French is a little rusty it’s still pretty easy to figure it out — just remember everything is in European dates/hours.