Learning how to book trains in Morocco takes about five minutes once you know which website to use—and what to do if your foreign credit card gets rejected at checkout. Morocco runs Africa's best passenger rail network, operated by the state company ONCF (Office National des Chemins de Fer). Clean, air-conditioned trains link Tangier, Rabat, Casablanca, Meknes, Fes, and Marrakech every day for a fraction of European rail prices, anchored by the 320 km/h Al Boraq high-speed line in the north.
To buy Morocco train tickets online, go directly to the official Morocco train website at oncf-voyages.ma (not oncf.ma, which is only the corporate info portal). You can book up to 30 to 60 days ahead, pick 1st or 2nd class, and save the QR-code PDF straight to your phone. If the Moroccan payment gateway declines your US, UK, or Canadian card, you do not need to panic: simply use a third-party seller like 12Go or Omio for a small €2–€4 markup, or buy all your tickets on the spot in 60 seconds at any red ONCF touchscreen kiosk once you land.
This ground-level guide covers everything you need to ride Moroccan rails without confusion—from reading the Morocco train map 2026, choosing between 1st and 2nd class, surviving the Casablanca-to-Marrakech transfer trap, and connecting by Supratours bus to towns the railway doesn't reach.

Quick-Answer Overview: Morocco's 3 Train Types Compared
Before you look up timetables, know which of ONCF's three train categories you are booking. Prices, seat rules, and speed change completely depending on the train name printed on your ticket:
| Train Name | Routes Served (2026–2027) | Top Speed & Comfort | Seat Reservation Rules | Typical Ticket Price (MAD / USD) |
|---|---|---|---|---|
| Al Boraq (High-Speed TGV) | Tangier ↔ Kenitra ↔ Rabat Agdal ↔ Casa-Voyageurs | 320 km/h — Modern double-decker French TGV trains with cafe car & power outlets. | Mandatory assigned seats in both 1st and 2nd class. Dynamic pricing (cheaper if booked early). | 149–260 MAD (2nd) / 220–380 MAD (1st) (~$15–$38) |
| Al Atlas (Intercity Express) | Marrakech ↔ Casablanca ↔ Rabat ↔ Meknes ↔ Fes ↔ Oujda / Tangier | 160 km/h — Classic express trains (mostly 6- or 8-seat compartments plus newer open-plan cars). | Assigned seats in 1st class; 2nd class is assigned on some runs but frequently open/crowded on weekends. | 110–210 MAD (2nd) / 170–320 MAD (1st) (~$11–$32) |
| TNR (Regional Shuttle) | Casablanca Airport (CMN) ↔ Casablanca ↔ Rabat ↔ Kenitra / El Jadida | 120–160 km/h — Frequent commuter double-deckers running every 30–60 minutes. | Open seating (first-come, first-served) in both classes. Fixed flat fare; never sells out. | 45–70 MAD (2nd) / 65–105 MAD (1st) (~$4.50–$10.50) |
How to Purchase Train Tickets in Morocco (3 Proven Methods)
Travelers searching "how to purchase train tickets in Morocco" usually hit one of two snags: landing on the wrong ONCF domain or getting a mysterious payment error from their home bank. Here are the three ways that actually work in 2026–2027.

Method 1: The Official Morocco Train Website (oncf-voyages.ma)
For direct face-value pricing and Yalla promotional fares, use www.oncf-voyages.ma (switch the language button at the top right from FR to EN).
- Enter French Station Names: Type Tanger Ville (not Tangier), Fes, Marrakech, Rabat Ville (or Rabat Agdal), and Casa Voyageurs.
- Choose Your Comfort Class: Select 1st Class or 2nd Class. Look for "Yalla Al Boraq" or "Yalla Al Atlas" fares—these are non-refundable promo tickets that cut up to 40% off the walk-up price if you book 3 to 14 days ahead.
- Enter Passenger Details: You do not need to create an ONCF account; guest checkout works fine. Double-check your email address because your PDF e-ticket arrives there immediately.
- Pay & Download the QR Code: Save the PDF to your phone (or screenshot the QR code). You do not need to print paper copies—inspectors and platform turnstiles scan your smartphone screen directly.
Why Foreign Credit Cards Fail on oncf-voyages.ma (And How to Fix It)
A notorious quirk of booking Morocco train tickets online is seeing "Transaction Refused" or "Payment Failed" on the Moroccan CMI payment screen, even when your card has plenty of funds. This happens because Moroccan CMI gateways frequently block non-Moroccan IP addresses or fail cross-border 3D-Secure SMS handshakes with US, Canadian, and UK banks.
How to beat the CMI checkout error:
- Switch to a Mastercard or Revolut/Wise Virtual Card: Visa cards issued in North America fail most often on CMI; European Mastercards, Wise, and Revolut cards pass far more reliably (check our money guide on What Currency Is Used in Morocco? for travel card tips).
- Notify Your Bank App First: Approve the 3D-Secure push notification inside your banking app immediately (SMS codes often time out).
- Try the Official M'ONCF Mobile App: Available on iOS and Android, the M'ONCF app sometimes processes international Apple Pay / card payments when desktop browsers fail.
- Skip the Stress—Buy in Person or Use an Aggregator: If the website rejects two cards, stop wasting your evening and use Method 2 or Method 3 below.
Method 2: At the Station Kiosk or Ticket Counter (Guichet)
Once you arrive in Morocco, buying tickets in person is painless and takes under two minutes:
- Red Self-Service Touchscreen Kiosks: Located in the main halls of Casablanca Airport, Casa-Voyageurs, Marrakech, Rabat, Fes, and Tangier stations. Switch the screen to English, pick your destination and class, tap your foreign Visa/Mastercard (chip-and-PIN works reliably on physical machines), and collect your printed paper ticket with seat number.
- Staffed Ticket Counters (Guichets): Pay in Moroccan Dirham (MAD) cash or by card. A smart move on Day 1 is to walk up to the counter and buy all your train legs for the entire week in one go so you never queue again.
Method 3: International Aggregators (12Go or Omio)
If you are flying in during a peak holiday weekend and refuse to land without confirmed Al Boraq seats in hand—and oncf-voyages.ma keeps rejecting your card—book through 12Go or Omio. They connect to ONCF inventory, accept PayPal, Apple Pay, and every foreign credit card cleanly, and charge a modest €2 to €5 service fee per ticket. Avoid shady reseller websites charging double the official fare (a Casablanca–Marrakech ticket should never cost $45+ in 2nd class!).
Morocco Train Map 2026: Where Trains Go (And Where They Don't)
Looking closely at the Morocco train map 2026 saves you from building an impossible itinerary. Morocco's rail network forms a giant sideways "T" covering the northern and central imperial cities—but it stops at Marrakech in the south and does not cross the High Atlas Mountains or Rif Mountains.

Major Cities Connected Directly by ONCF Trains
- Northern High-Speed Spine (Al Boraq): Tangier (Tanger-Ville) ↔ Kenitra ↔ Rabat (Rabat Agdal) ↔ Casablanca (Casa-Voyageurs).
- Central & Southern Spine (Al Atlas): Casablanca ↔ Settat ↔ Benguerir ↔ Marrakech.
- Eastern Imperial Line (Al Atlas): Casablanca / Rabat / Kenitra ↔ Meknes ↔ Fes ↔ Taza ↔ Oujda (and north to Nador).
- Airport & Coastal Branches (TNR): Casablanca Mohammed V Airport (CMN), El Jadida, and Safi.
Famous Destinations NOT on the Train Morocco Map (And How to Reach Them)
You cannot take a train directly to these five major tourist spots:
- Chefchaouen (The Blue City): No train station (it sits high in the Rif Mountains). Take the train to Tangier or Fes, then transfer to a CTM bus (2.5 hrs from Tangier; 4 hrs from Fes). (See our Chefchaouen Travel Guide).
- Essaouira (Atlantic Coast): No train station. Take the train to Marrakech, walk 50 meters outside the station exit to the Supratours terminal, and ride the comfortable 3-hour coach to Essaouira.
- Agadir & Taghazout: No train station. Connect at Marrakech via a Supratours or CTM coach (3.5 hours via the A3 motorway).
- Ouarzazate & Ait Ben Haddou: Over the High Atlas mountains—bus or private car from Marrakech (4 hours).
- Merzouga (Sahara Desert): No rail link—reached via desert tour, rental car, or overnight Supratours bus from Marrakech or Fes.

The ONCF + Supratours Secret: Supratours is the official bus subsidiary owned by ONCF! On oncf-voyages.ma, you can search routes like Casablanca → Essaouira or Rabat → Agadir and buy one single combined Train + Bus ticket. The Supratours coach waits right next to the Marrakech train station exit and holds for delayed connecting trains.
2026–2027 Construction Update: The Kenitra–Marrakech High-Speed Line
Right now, Morocco is laying track for the massive 430 km Al Boraq high-speed extension from Kenitra through Casablanca Airport straight to Marrakech ahead of the 2030 FIFA World Cup. Because active engineering works ramped up in late 2026 along the Kenitra–Casablanca–Marrakech corridor, ONCF periodically adjusts train timetables by 10 to 25 minutes. Always check live departure times on oncf-voyages.ma 48 hours before your travel day rather than trusting old blog schedules from 2023.
Al Boraq Train Morocco: Everything You Need to Know
Launched as Africa's first high-speed railway, the Al Boraq train Morocco is genuinely world-class. Traveling at 320 km/h (200 mph) between Tangier and Kenitra before joining upgraded tracks into Rabat and Casablanca, it slashes what used to be a 5-hour road trip down to 2 hours and 10 minutes.
Real Al Boraq Travel Times & Fares (2026–2027)
- Tangier to Kenitra: 50 minutes (from ~109 MAD in 2nd class)
- Tangier to Rabat Agdal: 1 hour 20 minutes (from ~129 MAD in 2nd class / ~195 MAD in 1st class)
- Tangier to Casablanca (Casa-Voyageurs): 2 hours 10 minutes (from ~149–240 MAD in 2nd class / ~230–370 MAD in 1st class)
4 Insider Al Boraq Perks Most Tourists Miss
- Free 1st-Class Station Lounge (Salon Al Boraq): If you buy a 1st-Class Al Boraq ticket, do not wait on the crowded concourse benches! Show your QR code at the glass Al Boraq Lounge inside Tanger-Ville, Rabat Agdal, or Casa-Voyageurs stations up to 1 hour before departure for free espresso, mint tea, Moroccan pastries, fast Wi-Fi, and clean private restrooms.
- Dynamic Airline-Style Pricing: Unlike regular trains, Al Boraq fares rise as departure approaches. Booking 7 to 14 days ahead saves 30% to 45% compared to walking up 20 minutes before departure.
- Onboard Café Car (Voiture Bar): Located in the middle of the train (usually Car 4 or 14), serving decent hot paninis, croissants, espresso, and cold drinks (cash MAD or card).
- Power Sockets & Wi-Fi: Every seat in 1st class (and most seats in 2nd class) has standard European Type C/E power outlets (220V). Onboard Wi-Fi exists on Al Boraq, though mobile 4G/5G on a local Moroccan SIM card is much faster and more reliable.
Casablanca Train Station to Marrakech: Station Traps & Real Timings
One of the highest-searched routes on Google is casablanca train station to marrakech. It is an easy, scenic ride—as long as you go to the right station!

Trap #1: Casa-Voyageurs vs. Casa-Port (Don't Go to the Wrong One!)
Casablanca has two major downtown stations, and tourists mix them up constantly:
- Casa-Voyageurs (USE THIS ONE): Casablanca's flagship modern hub. Every direct train to Marrakech, Fes, and Tangier (Al Boraq) departs from Casa-Voyageurs.
- Casa-Port: A smaller commuter terminus down near the port and Hassan II Mosque. It serves airport trains (TNR) and regional trains to Rabat, not direct Marrakech expresses. If you buy a ticket from Casa-Port to Marrakech, you will have to change trains at Ain Sebaa or L'Oasis. Save yourself the hassle and take a 10-minute petit taxi or tram straight to Casa-Voyageurs.
Trap #2: Rabat Ville vs. Rabat Agdal
The exact same rule applies in the capital:
- Rabat Agdal: The gleaming modern station where Al Boraq high-speed trains stop (located in the modern Agdal district, 10 minutes by taxi/tram from the Medina).
- Rabat Ville: Right in the downtown center next to the Medina and Kasbah of the Udayas—served by Al Atlas (Marrakech/Fes) and TNR trains, not Al Boraq.
Casablanca to Marrakech Route Facts
- Train Type: Direct Al Atlas express trains.
- Frequency: Roughly every 1 to 2 hours from ~5:50 AM to ~9:50 PM.
- Journey Time: 2 hours 40 minutes to 3 hours 05 minutes (rolling straight into Gare de Marrakech in Gueliz, 10 minutes by taxi from Jemaa el-Fnaa).
- 2026–2027 Fare: ~110–150 MAD ($11–$15) in 2nd Class; ~170–225 MAD ($17–$22.50) in 1st Class.
(Flying straight into Mohammed V Airport? Read our dedicated step-by-step breakdown on How to Get from Casablanca Airport to Marrakech for Basement Level -1 airport station directions).
What Is the Difference Between First and Second Class on a Morocco Train?
When travelers ask "what is the difference between first and second class on a Morocco train?", the short verdict is this: on any journey longer than 1 hour, pay the extra $5 to $9 for First Class.

Here is the honest side-by-side comparison so you know exactly what your extra dirhams buy:
| Feature | 1st Class (1ère Classe) | 2nd Class (2ème Classe) |
|---|---|---|
| Price Difference | Only 50–100 MAD ($5–$10 / £4–£8) more on intercity routes | Cheapest base fare |
| Seat Guarantee (Al Atlas) | Always reserved & guaranteed (printed on ticket) | Frequently first-come, first-served on busy runs—can mean standing in the corridor if full! |
| Seat Layout (Al Atlas) | 6 wide seats per glass compartment (3 facing 3) or spacious 2+1 open rows | 8 tighter seats per compartment (4 facing 4, knee-to-knee) or 2+2 open rows |
| Seat Layout (Al Boraq) | Spacious 2+1 reclining leather/fabric seats + free station lounge access | Comfortable 2+2 seats (still very nice and assigned!) |
| Air Conditioning & Noise | Stronger AC, quieter atmosphere (business travelers, families, tourists) | AC can struggle when carriages pack out on summer weekends |
| Luggage Space | Wider overhead racks + uncrowded end-of-car suitcase racks | Tighter overhead racks; end racks fill up quickly |
| Solo Female Comfort | Highly Recommended — calm, spacious, frequent conductor patrols | Safe, but cramped compartments can feel overwhelming during rush hour |
(Traveling solo as a woman? Check our complete rail and city safety breakdown in Is It Safe for Women to Travel Alone in Morocco?).
Popular Morocco Train Routes: Times & 2026–2027 Ticket Prices
Use this table to plan your rail days and estimate your transport costs (pair it with our How Much Money Should I Budget Per Day in Morocco? guide):
| Popular Rail Route | Train Type | Duration | 2nd Class Fare (MAD) | 1st Class Fare (MAD) | Direct? |
|---|---|---|---|---|---|
| Tangier → Casablanca | Al Boraq (TGV) | 2h 10m | 149–240 MAD | 230–370 MAD | Yes |
| Tangier → Rabat Agdal | Al Boraq (TGV) | 1h 20m | 129–195 MAD | 195–290 MAD | Yes |
| Casablanca → Marrakech | Al Atlas | 2h 45m | 110–155 MAD | 170–230 MAD | Yes |
| Casablanca → Fes | Al Atlas | 3h 45m – 4h 00m | 135–175 MAD | 205–265 MAD | Yes |
| Rabat Ville → Fes | Al Atlas | 2h 40m – 3h 00m | 95–130 MAD | 145–195 MAD | Yes |
| Fes → Meknes | Al Atlas | 40 minutes | 25–35 MAD | 40–55 MAD | Yes |
| Marrakech → Fes | Al Atlas | 6h 30m – 7h 00m | 220–275 MAD | 330–415 MAD | Yes (Direct daytime trains!) |
| Tangier → Marrakech | Al Boraq + Al Atlas | 5h 30m – 6h 00m | 260–380 MAD | 400–580 MAD | 1 transfer at Casa-Voyageurs |
| Tangier → Fes | Al Boraq + Al Atlas | 3h 45m – 4h 30m | 160–240 MAD | 250–360 MAD | 1 transfer at Kenitra (or slower direct Al Atlas ~4h 40m) |
(Note: Marrakech to Fes runs direct several times a day—no transfer needed—and takes around 6.5 hours, making it one of Morocco's easiest scenic travel days! Explore both cities in our Marrakech Travel Guide and Fes Travel Guide).
Step-by-Step: How to Ride a Moroccan Train Like a Local
Even if you have never ridden a train in North Africa, Moroccan stations work almost identically to French SNCF stations:
- Arrive 25–30 Minutes Early: Stations in Tangier, Rabat, Casablanca, and Marrakech are big, modern buildings. Give yourself time to grab water and find your platform—and note that Al Boraq boarding gates close 2 minutes before departure.
- Check the Voie (Platform) Board: Large screens in French and Arabic show your train number, destination, departure time, and platform (Voie 1, Voie 2, etc.). Platforms usually post 15 to 20 minutes before departure.
- Pass Through the Ticket Barrier: At major Al Boraq stations, scan your phone's QR code or paper ticket barcode at the automatic glass turnstiles. (On older regional stations without turnstiles, walk straight onto the platform; no manual "compostage" punch machine is needed anymore for modern QR tickets).
- Match Your Voiture (Car) & Place (Seat): Look at your ticket for
Voiture(carriage number) andPlace(seat number). On the platform, digital displays or painted numbers on the carriage doors show which car is 1st class (marked with a yellow stripe or big1) and 2nd class (green stripe or2). - Stow Your Luggage Smartly: ONCF allows up to two standard suitcases and a personal backpack per passenger without weigh-ins, as long as you can lift them yourself. Small and medium bags fit in the overhead rack right above your seat; large rolling suitcases go into the vertical racks near the carriage doors. Keep valuables (passport, camera, cash) in your lap bag.
- Keep Your Ticket Until You Exit: A conductor will scan your ticket shortly after departure, and major stations like Casa-Voyageurs and Tanger-Ville require you to scan your QR code again to open the exit turnstiles!
Do Moroccan Trains Sell Out? (When You Actually Need to Book Ahead)
Travelers often search "do Moroccan trains sell out?" because they worry about getting stranded mid-trip. The real answer splits down the middle:
- Al Boraq High-Speed Trains: Yes, they sell out regularly—especially Friday afternoons, Sunday evenings, and peak morning business departures (8:00 AM and 9:00 AM) between Tangier, Rabat, and Casablanca. Book 3 to 10 days ahead to guarantee seats and snag cheaper Yalla fares.
- Al Atlas Intercity Trains (1st Class): 1st Class can sell out 1 to 2 days ahead on popular routes like Marrakech–Casablanca and Fes–Casablanca during peak spring/autumn months (March–May, September–November) and Moroccan holidays.
- Al Atlas (2nd Class) & TNR Shuttles: Almost never sell out completely on normal days because ONCF sells standing-room overflow tickets—meaning you can always get on the train, though you might end up standing if you wait until the last minute on a Sunday evening.
- Moroccan Religious Holidays (Eid al-Fitr & Eid al-Adha): During the 3 days before and after Eid, every train in Morocco sells out completely days in advance. If your trip overlaps Eid, lock in all train tickets 2 to 3 weeks ahead!
Is It Easy to Get Around Morocco by Train? (Honest Verdict)
Answering Google's question "is it easy to get around Morocco by train?": Yes—for the Imperial Cities circuit (Tangier, Rabat, Casablanca, Meknes, Fes, and Marrakech), the train is by far the easiest, safest, and most relaxing way to travel.
- Why trains beat renting a car between big cities: Driving inside Marrakech, Fes, or Casablanca traffic is chaotic, parking near car-free medinas is a headache, and speed traps line every highway exit. Taking the train drops you right in the city center rested and stress-free.
- Where you need buses or a driver: Because the rail map ends at Marrakech and skips the mountains, combine ONCF trains for the big northern/central hops with Supratours / CTM buses (for Essaouira and Chefchaouen) and a private driver or desert tour for the High Atlas and Sahara. (Still structuring your route? Read How Many Days Do I Need to Explore Morocco? and Visiting Morocco for the First Time).
Do's and Don'ts: Using Trains in Morocco
| Do | Don't |
|---|---|
Book directly on oncf-voyages.ma (or the M'ONCF app) for face-value fares and Yalla discounts |
Overpay double on unofficial third-party sites when station kiosks sell the exact same ticket in 60 seconds |
| Upgrade to 1st Class on Al Atlas routes over 1 hour (guaranteed seat + quieter compartment) | Assume 2nd Class on a Sunday afternoon Al Atlas train will have empty seats |
| Depart from Casa-Voyageurs for Marrakech/Fes/Tangier and Rabat Agdal for Al Boraq | Go to Casa-Port expecting a direct Marrakech train or Rabat Ville expecting Al Boraq |
| Use ONCF's built-in Supratours bus connection on the same ticket for Essaouira or Agadir | Waste time looking for a direct train station in Chefchaouen, Essaouira, or the Sahara |
| Keep your QR code PDF or paper ticket accessible until you exit the arrival station turnstiles | Throw your paper ticket away after the onboard conductor scans it |
| Arrive 25 minutes early and enjoy the free Al Boraq Lounge if holding a 1st-Class TGV ticket | Pre-book a non-refundable fixed train immediately after an international flight landing at CMN |
Frequently Asked Questions (FAQ)
How do I book trains in Morocco online?
Go to the official Moroccan railway booking site at www.oncf-voyages.ma (or download the M'ONCF app), switch the interface to English, enter your stations using French spellings (e.g., Tanger Ville, Casa Voyageurs, Marrakech), select 1st or 2nd class, and pay online to receive a QR-code PDF by email. If your foreign card fails on the Moroccan CMI gateway, use 12Go or Omio for a small fee, or buy tickets at any station touchscreen kiosk on arrival.
What is the difference between first and second class on a Morocco train?
On conventional Al Atlas intercity trains, 1st Class gives you a guaranteed reserved seat in a spacious 6-seat compartment (or wide 2+1 open car) with better AC and luggage space, while 2nd Class has tighter 8-seat compartments and often operates as first-come, first-served seating. On the high-speed Al Boraq train, both classes have assigned seats, but 1st Class offers wider 2+1 seating plus free access to the station Al Boraq Lounge with coffee and pastries.
Do Moroccan trains sell out?
Al Boraq high-speed trains and 1st-Class cabins on major intercity routes regularly sell out on Friday afternoons, Sunday evenings, and national holidays—book these 3 to 10 days ahead. Regular 2nd-Class Al Atlas and TNR airport shuttle trains rarely sell out on ordinary weekdays and can easily be bought on the day of travel.
How early should I arrive at a train station in Morocco?
Arrive 20 to 30 minutes before departure at major hubs like Casa-Voyageurs, Tanger-Ville, Rabat Agdal, and Marrakech. Platforms (Voies) are announced on digital boards 15–20 minutes prior, and Al Boraq boarding gates close strictly 2 minutes before the train rolls out.
Is it easy to get around Morocco by train without speaking French or Arabic?
Yes. The official booking site (oncf-voyages.ma), station touchscreen kiosks, and major station signage all include English options, and station staff in Marrakech, Casablanca, Rabat, Fes, and Tangier handle international travelers every single day. Having your destination written down in French (Casa-Voyageurs, Fes, Tanger-Ville) makes counter interactions effortless.
Official Railway & Bus Reference Links
Always verify live 2026–2027 schedules, promotional Yalla fares, and bus connections directly through Morocco's official transport portals:
- ONCF Voyages – Official Morocco Train Website for Online Tickets & Live Timetables
- ONCF Corporate Portal – Official Al Boraq High-Speed Rail & Network Information
- Supratours (ONCF Subsidiary) – Official Train-to-Bus Connections to Essaouira & Agadir
- The Man in Seat 61 – Independent Practical Guide to Rail Travel in Morocco
(Mapping out the rest of your route? Check our city guides for Tangier, Marrakech, and Fes, and review our cultural checklist in Morocco Rules for Tourists!)

