Morocco by Train: ONCF Routes, Prices and Booking Tips for 2026

Al Boraq high-speed train at Tangier station in a morocco by train guide

There is no better way to see Morocco than from a train window. Travelling morocco by train means watching the Atlantic coast slide past near Rabat, the olive groves of the north give way to the plains, and the red walls of Marrakech appear on the horizon after a comfortable ride. For Morocco by train, the appeal is simple: it is cheap, reliable, and far more relaxing than driving or flying between the country’s great cities.

Morocco’s national railway, ONCF, runs one connected network from Tangier to Marrakech, with branches to Fes, Meknes, Oujda and the coast. The star is Al Boraq, Africa’s first high-speed train, linking Tangier and Casablanca in just over two hours. This guide to Morocco by train covers every route that matters, what each journey costs, and exactly how to book.

Whether you are planning a two-city hop or a full rail loop around the country, morocco by train rewards a little preparation. Book Al Boraq early for the cheapest fares, know which station your train actually leaves from, and carry a charged phone for your e-ticket. The rest is easy: sit back, order a coffee, and enjoy the ride.

In this guide:

  • Why the Train Is the Smartest Way to Cross Morocco
  • How the ONCF Network Works
  • Main Routes, Times and Fares
  • Al Boraq vs Al Atlas: Which Train Should You Take?
  • How to Book ONCF Tickets Online and at the Station
  • First Class vs Second Class, Luggage and Onboard Life
  • Sample Rail Itineraries and When to Take the Bus Instead
  • Frequently Asked Questions

Why the Train Is the Smartest Way to Cross Morocco

Morocco’s cities are spread along a single, well-served rail spine, and crossing Morocco by train is the most comfortable way to move between them. A second-class ticket from Casablanca to Marrakech costs less than a taxi across town in many European capitals, and the journey takes under three hours — a combination of price and comfort that is hard to beat.

Comfort is only part of the story. Choosing morocco by train also removes the stress of Morocco’s roads: no negotiating with taxi drivers, no navigating motorway tolls, and no white-knuckle overtaking on two-lane highways. You arrive in the centre of your destination city, usually within walking distance of a tram or taxi stand.

Exploring Morocco by train is also the greenest practical choice for intercity travel. One full train carries hundreds of passengers with far lower emissions per person than the same number of cars or a short domestic flight.

Rail travel also fits naturally into a longer stay. When you are working out what life in Morocco actually costs, transport is one of the first numbers to pin down. Our guide to Morocco grocery prices and our breakdown of utility bills in Morocco sit alongside this guide — and if you are considering a longer stay, rent prices in Morocco will help you budget the whole trip. The point is simple: morocco by train keeps the biggest line in your travel budget small, so the rest of your money goes further.

Morocco by Train: How the ONCF Network Works

ONCF, the Office National des Chemins de Fer, is Morocco’s national railway operator, and for Morocco by train it is the only operator you need to know. It runs every passenger train in the country on one network, with one website, one app, and one ticketing system. There are no competing operators to compare, which makes planning refreshingly simple.

The network has three kinds of train, and knowing them is the key to Morocco by train. Al Boraq is the high-speed service, running on a dedicated line between Tangier and Kenitra, then onward to Rabat and Casablanca. Al Atlas trains are the conventional intercity services that cover everything else, including Casablanca to Marrakech and the line to Fes. TNR trains are the commuter shuttles around Casablanca and Rabat, including the airport train.

Stations matter more than most visitors expect. Casablanca has Casa Voyageurs, the big intercity hub, and Casa-Port, closer to the old city centre; Rabat has Rabat-Ville in the centre and Rabat-Agdal on the high-speed line. Always check the exact station name on your ticket — the wrong station can cost you an hour.

If you are travelling Morocco by train, most intercity services run about once an hour during the day, roughly from 06:00 to 21:00. Al Boraq runs hourly between Tanger-Ville and Casa Voyageurs. Al Atlas services on the Marrakech to Fes corridor also run about hourly. Early morning and late evening trains are quieter, while Friday afternoons and Sunday evenings are the busiest.

Travellers waiting on the platform of a Moroccan railway station

Main Routes, Times and Fares

Fares for Morocco by train are dynamic: the same seat costs less when you book early and more on the day of travel. The table below gives realistic ranges in Moroccan dirhams (MAD), with US dollar equivalents at roughly 10 MAD to 1 USD. The cheapest published fares are the Yalla promotional fares, for a limited number of seats bought at least seven days ahead.

The most important route to understand is the Al Boraq corridor. Tangier to Casablanca takes about 2 hours 10 to 2 hours 17 minutes. Second-class fares typically run from about 149 to 200 MAD (about $15 to $20) in advance, rising to 225 to 270 MAD (about $22 to $27) on the day, while first class typically runs from about 229 to 350 MAD (about $23 to $35). The Yalla starting fare is 89 MAD (about $9) in second class and 129 MAD (about $13) in first, for early bookings only.

South of Casablanca, Al Atlas trains take over. Casablanca to Marrakech takes about 2 hours 40 to 2 hours 55 minutes, and a second-class ticket typically costs 98 to 160 MAD (about $10 to $16), with first class from about 120 to 230 MAD (about $12 to $23). The Yalla fare on this line starts at 49 MAD (about $5) in second class. It is one of the best-value train journeys anywhere in the world.

Read the table as a planning tool for Morocco by train, not a price list. Check the exact fare for your date on the official booking portal before you commit, because prices move with demand. The note under the table explains what is verified and what is an estimate, so you always know which figures are firm.

Route Train Journey time 2nd class (MAD / USD) 1st class (MAD / USD)
Tangier – Casablanca Al Boraq About 2h 10–2h 17 From 89 MAD (~$9) Yalla; typically 149–200 MAD (~$15–$20) From 129 MAD (~$13) Yalla; typically 229–350 MAD (~$23–$35)
Casablanca – Marrakech Al Atlas About 2h 40–2h 55 From 49 MAD (~$5) Yalla; typically 98–160 MAD (~$10–$16) From 120 MAD (~$12); typically 180–230 MAD (~$18–$23)
Casablanca – Rabat Al Boraq / Al Atlas About 50 min–1h From 50 MAD (~$5); typically 50–75 MAD (~$5–$8) From 70 MAD (~$7); typically 70–110 MAD (~$7–$11)
Casablanca – Fes Al Atlas About 4h 05 Typically 130–165 MAD (~$13–$17) Typically 190–260 MAD (~$19–$26)
Marrakech – Fes (via Casablanca) Al Atlas About 6h 30–7h Typically 195–240 MAD (~$20–$24) Typically 310–380 MAD (~$31–$38)
Tangier – Marrakech (via Casablanca) Al Boraq + Al Atlas About 5h–5h 30 Estimated combined 240–360 MAD (~$24–$36) Estimated combined 350–580 MAD (~$35–$58)

Prices checked November 2026. Fares are dynamic and change with date and demand; Yalla fares are promotional starting fares for a limited number of seats bought at least 7 days ahead. The Tangier–Marrakech fares are estimated combined fares for the two legs (Tangier–Casablanca plus Casablanca–Marrakech), as there is no direct train; confirm the exact total at booking. Times are from the ONCF timetable in force since September 2026. USD equivalents use roughly 10 MAD = 1 USD.

Casablanca to Rabat is the commuter backbone of the country, with trains so frequent you rarely need to plan around a timetable. Rabat itself rewards a slow morning: our Rabat travel guide covers what to do around the station and the medina, and our Casablanca travel guide pairs well with a rail arrival at Casa Voyageurs.

Al Boraq vs Al Atlas: Which Train Should You Take?

Al Boraq and Al Atlas are different experiences, and when you travel Morocco by train, choosing between them is usually decided by your route rather than your preference. Al Boraq only runs between Tangier, Kenitra, Rabat-Agdal and Casablanca. Everywhere else, Al Atlas is your train. Where both run, Al Boraq is faster and more modern; Al Atlas is cheaper and stops at more stations.

Speed is the headline difference. Al Boraq reaches 320 km/h on its dedicated high-speed section, cutting Tangier to Casablanca to just over two hours. That is less than half the time of the conventional route. If you are travelling morocco by train on a tight schedule, Al Boraq is the reason the north of the country feels so compact.

Comfort is closer than the price gap suggests. Al Boraq has modern air-conditioned coaches, power sockets, and a smooth, quiet ride. Al Atlas first class is comfortable too, with six-seat compartments and generous legroom — though its second class can be crowded at peak times, while Al Boraq always gives you a reserved seat.

Booking works differently too. Al Boraq seats are reserved and priced dynamically, so the fare depends on when you book. Al Atlas tickets are simpler: a reserved seat in both classes, with fares that vary less. For Morocco by train, the rule is the same on both — book early for the best price.

Feature Al Boraq (high-speed) Al Atlas (conventional)
Top speed Up to 320 km/h Up to 160 km/h
Routes Tangier – Kenitra – Rabat – Casablanca Marrakech – Casablanca – Rabat – Fes, plus branches
Typical Tangier–Casablanca fare 2nd: 149–200 MAD (~$15–$20); 1st: 229–350 MAD (~$23–$35) Not available on this corridor
Booking Reserved seat; dynamic pricing, book early Reserved seat; fares vary less
Comfort Modern coaches, power sockets, very smooth Air-conditioned; 1st class compartments are quiet
Best for Fast north–south hops on a schedule Marrakech, Fes and scenic longer journeys

Prices checked November 2026. Al Boraq fares are dynamic; the figures above are typical advance-booking ranges, with Yalla fares from 89 MAD (~$9) in second class. Confirm your exact fare at booking.

How to Book ONCF Tickets Online and at the Station

Booking online is the best option for most travellers planning Morocco by train, and it is straightforward once you know the two official sites. The ONCF website at oncf.ma has timetables and network information in English and French, and the booking portal at oncf-voyages.ma is where you actually buy tickets. There is also an ONCF Voyages app, which is handy for buying on the move and showing your ticket at the gate.

Start your Morocco by train booking by searching your route and date on the portal. You will see the available departures, the journey time, and the fare for each train. Choose your train and class, enter your name, and pay by card. Your e-ticket arrives by email and in the app, with a QR code that inspectors scan on board. Save it offline, because station Wi-Fi is not always reliable.

Foreign cards sometimes cause trouble: the payment gateway can decline non-Moroccan Visa and Mastercard payments, often because of 3D Secure checks. If your card is declined, try a different card or the app. If it still fails, buy at the station — a reliable fallback.

Buying at the station is simple and works well for Morocco by train, especially on Al Atlas services, where fares vary less. Go to the ticket counter or the self-service machine, choose your destination and departure, and pay in dirhams by card or cash. For Al Boraq, buy as early as you can: the cheapest seats sell first, and a same-day ticket can cost double the advance fare. Arrive at least 20 minutes before departure, and 30 minutes at Casa Voyageurs or Tanger-Ville at busy times.

First-class carriage interior on a Moroccan intercity train

First Class vs Second Class, Luggage and Onboard Life

For Morocco by train, the first-class upgrade is one of the cheapest in the world, and on longer journeys it is usually worth it. On Al Atlas, first class means a six-seat compartment with wider seats, more legroom, and a quieter carriage. On Al Boraq, first class adds space and calm rather than a different world — second class is already modern and comfortable.

Luggage for Morocco by train is refreshingly simple. There is no checked baggage and no strict weight limit, so bring what you can carry. Large suitcases go on the racks at the end of the carriage or between seats. Keep valuables in a small bag with you, and your passport and phone in a pocket or daypack rather than in a suitcase on the rack.

Onboard life is low-key. Most intercity trains have a buffet car or trolley selling coffee, tea, water and snacks, but the selection is basic and it does not always appear. Bring water and a snack for the long Fes run. Power sockets are common on Al Boraq but not guaranteed — charge your phone before you board.

Seat reservations for Morocco by train deserve a clear explanation. On Al Boraq, every ticket comes with an assigned seat, so you simply find your coach and seat number. On Al Atlas, both classes have reserved seats too. Check the coach letter and seat number printed on your ticket, and board the right coach — walking through a crowded train with a suitcase is no fun.

Sample Rail Itineraries and When to Take the Bus Instead

A classic first Morocco by train trip uses the railway for everything. Fly into Casablanca, take Al Boraq north to Rabat for two days, continue to Tangier, then return south through Casablanca to Marrakech. The whole loop uses four train journeys and costs roughly 500 to 700 MAD (about $50 to $70) per person in second class. It is the simplest possible introduction to the country.

A slower version adds Fes. From Rabat, take the Al Atlas line east through Meknes to Fes, spend two or three days in the medina, then return to Casablanca and continue to Marrakech. The Fes leg is the longest single journey in this plan, at about four hours from Casablanca, so book first class and bring a book.

Not every destination is a train destination. The train does not reach Chefchaouen, Essaouira, the Atlas Mountains, or the Sahara — for those, you need a bus, a shared taxi, or a tour, and Agadir has no passenger railway at all. Use the train for the big city-to-city moves, then switch to road transport for the rest.

Timing matters too. Take the earliest train when crossing the country in a single day, and keep a one-hour buffer between connections. Our homepage links to the rest of our Morocco guides, so you can plan the road legs and the rail legs together.

Frequently Asked Questions

Can I book ONCF tickets online before I arrive in Morocco?

Yes. The official booking portal sells tickets to anyone, and you can buy weeks ahead from anywhere in the world. Your e-ticket arrives by email with a QR code, so you only need your phone to board. If a foreign card is declined, try a second card or the ONCF Voyages app, and buy at the station as a fallback.

Do I need to print my e-ticket, or is the phone enough?

Your phone is enough. Inspectors scan the QR code from your screen, and most stations accept the ticket in the app. Save the ticket offline or take a screenshot before you travel, because mobile signal and station Wi-Fi can be patchy. Keep the ticket until you exit the destination station.

How much luggage can I bring on the train?

There is no checked baggage and no strict weight limit. Bring what you can carry and manage yourself. Large cases go on the end-of-carriage racks, and smaller bags go on the overhead racks or under your seat. Keep valuables, your passport and your phone in a small bag with you at all times.

What happens if my train is delayed?

Short delays are the most common, usually a few minutes on Al Atlas services and rarely more. Build a one-hour buffer before flights or onward departures. If a train is cancelled, ONCF staff at the station will usually move you to the next departure, and the booking portal shows live departure information.

Is first class worth the extra money?

On journeys over two hours, yes — the upgrade is often only 50 to 90 MAD (about $5 to $9) and buys a quieter carriage with more space. On short hops under an hour, second class is perfectly comfortable and the upgrade adds little. On Al Boraq, second class is already modern, so the upgrade is a luxury rather than a necessity.

Do children need their own ticket?

Children under four travel free, and children aged four to ten pay about half the adult fare. Buy their tickets at the same time as yours so you sit together, and bring ID if asked. Family compartments in first class are a good choice on long journeys, because they give children space to settle in.

Travelling the country this way is simple, cheap and genuinely enjoyable. Plan your route, book Al Boraq early, pack light, and let the railway do the work — morocco by train turns the journey itself into one of the best parts of the trip.

Leave a Comment