The Foreigner's Guide to ONCF Trains in Morocco: Al Boraq, Routes & The Credit Card Workaround (2026)
How to book ONCF and Al Boraq train tickets in Morocco: Solve foreign credit card payment failures, compare 1st vs 2nd class, and plan your routes seamlessly.
Morocco possesses one of the most modern and efficient railway systems in Africa. Operated by the national railway company ONCF (Office National des Chemins de Fer), Morocco's rail network includes Africa's first high-speed bullet train—Al Boraq—which connects Tangier to Casablanca at speeds up to 320 km/h (200 mph), as well as reliable air-conditioned Al Atlas intercity trains linking Marrakech, Casablanca, Rabat, and Fes.
However, for international travelers, booking train tickets online can be one of the most frustrating experiences in Moroccan travel. The official ONCF booking portal frequently declines foreign Visa and Mastercards without explanation, leaving visitors stranded or anxious before their arrival.
In this comprehensive 2026 logistics guide, our local team at MerzougaWay explains how the Moroccan rail network works, provides the step-by-step workaround to solve international card payment blocks, compares First Class vs Second Class comfort, and details how to connect from rail terminus cities (Marrakech and Fes) to the Sahara Desert.
[!NOTE] Fast-Facts & Direct Answer Summary: ONCF & Al Boraq Trains in Morocco
- High-Speed Rail (Al Boraq): Connects Tangier ➔ Kenitra ➔ Rabat ➔ Casablanca in just 2 hours and 10 minutes (speeds up to 320 km/h). Tickets cost ~150–320 MAD (€15–€32).
- Conventional Rail (Al Atlas): Connects Casablanca ➔ Marrakech (2h 40m) and Marrakech ➔ Fes (6h 30m).
- Why Foreign Credit Cards Fail on ONCF: The ONCF payment gateway frequently rejects non-Moroccan cards due to 3D Secure SMS OTP routing issues and domestic fraud filters.
- The 3 Card Workarounds: 1) Buy tickets at station red self-service kiosks using contactless chip cards; 2) Purchase at station ticket windows 24–48 hours in advance; 3) Use reputable international reseller platforms (e.g. Omio).
- Do Trains Go to the Desert? NO. Morocco's rail network ends at Marrakech in the south and Fes/Oujda in the north. Reaching Merzouga (Erg Chebbi) requires a Private 4x4 Desert Tour or a dedicated bus.
1. Morocco Rail Network & Travel Times Matrix
The table below outlines the primary train routes, transit durations, and realistic ticket prices:
┌───────────────────────────┬──────────────┬───────────────┬────────────────────────────┐
│ ROUTE CORRIDOR │ TRAIN TYPE │ DURATION │ 1ST CLASS / 2ND CLASS (MAD)│
├───────────────────────────┼──────────────┼───────────────┼────────────────────────────┤
│ Tangier ➔ Casablanca │ Al Boraq(TGV)│ 2h 10m │ 240–320 MAD / 150–200 MAD │
│ Tangier ➔ Rabat │ Al Boraq(TGV)│ 1h 20m │ 180–240 MAD / 115–160 MAD │
│ Casablanca ➔ Marrakech │ Al Atlas │ 2h 40m │ 180–230 MAD / 110–140 MAD │
│ Casablanca Airport ➔ City │ Al Bidaoui │ 35m │ 50–70 MAD (Standard) │
│ Fes ➔ Marrakech │ Al Atlas │ 6h 30m │ 310–380 MAD / 195–240 MAD │
│ Rabat ➔ Fes │ Al Atlas │ 2h 45m │ 145–190 MAD / 95–125 MAD │
│ Marrakech ➔ Merzouga (Sah)│ NO TRAIN │ 9–10h (Drive) │ Must book 4x4 / Bus │
└───────────────────────────┴──────────────┴───────────────┴────────────────────────────┘
2. The Credit Card Failure Workaround (How to Buy Tickets)
The single biggest headache for international tourists is attempting to purchase tickets on oncf-voyages.ma. When entering a European, American, British, or Australian credit/debit card, the system often displays an unhelpful generic error message: "Transaction Refused".
┌────────────────────────────────────────────────────────────────────────┐
│ WHY FOREIGN CARDS FAIL ON THE ONCF WEBSITE │
├────────────────────────────────────────────────────────────────────────┤
│ 1. Domestic Payment Gateway (CMI) rejects non-Moroccan IP addresses │
│ 2. Bank 3D Secure SMS two-factor authentication fails cross-border │
│ 3. Automated anti-fraud algorithms block low-volume transport portals │
└────────────────────────────────────────────────────────────────────────┘
The 3 Working Solutions:
Solution 1: Buy at Station Self-Service Kiosks (Fastest & Easiest)
Every major Moroccan train station (Marrakech, Casa-Voyageurs, Rabat-Agdal, Fes, Tangier-Ville) is equipped with modern, multilingual touchscreen ticket machines (French, English, Arabic).
- Foreign physical cards with chip-and-PIN and contactless technology (Visa, Mastercard, Revolut, Wise) work reliably at these physical station kiosks.
- Simply select your language, choose your departure and arrival station, tap your card, and the machine prints your physical ticket with seat assignments in under 60 seconds.
Solution 2: Buy at the Station Ticket Window (24–48 Hours Ahead)
If traveling during peak tourist seasons (October to April, Easter, Christmas, and Eid holidays), tickets—especially First Class on Al Boraq—can sell out.
- As soon as you arrive in Morocco, walk up to the station ticket counter (Guichet) and book all your upcoming train segments in a single transaction.
- Ticket window agents speak basic French and English. You can pay with Moroccan Dirham (MAD) cash or foreign credit cards.
Solution 3: Use International Booking Resellers
If you must have confirmed tickets in hand before boarding your flight to Morocco, use verified international booking aggregators such as Omio or 12Go. While they charge a small convenience service fee (approx. €2–€4), their checkout gateways seamlessly accept all foreign credit cards, Apple Pay, and PayPal.
3. First Class vs. Second Class: Is the Upgrade Worth It?
On conventional Al Atlas trains (like Casablanca to Marrakech or Marrakech to Fes), ticket prices are extremely inexpensive by international standards. The price difference between Second and First Class is typically only 50 to 90 MAD (€5 to €9).
┌─────────────────────────┬──────────────────────────┬──────────────────────────┐
│ FEATURE │ FIRST CLASS (1ÈRE CLASSE) │ SECOND CLASS (2ÈME CLASSE)│
├─────────────────────────┼──────────────────────────┼──────────────────────────┤
│ Seat Assignment │ GUARANTEED reserved seat │ NO seat assignment │
│ Compartment Layout │ 6 comfortable plush seats│ 8 seats per compartment │
│ Air Conditioning │ Strong, reliable climate │ Can be inconsistent │
│ Electrical Outlets │ In-compartment 220V plug │ Rarely available │
│ Luggage Space │ Overhead racks & space │ Often crowded │
│ Noise & Crowd Level │ Quiet, relaxed atmosphere│ Busy, lively, noisy │
│ Price Difference │ ~40–60% higher (€5–€10) │ Base economy fare │
└─────────────────────────┴──────────────────────────┴──────────────────────────┘
[!TIP] Local Expert Recommendation: For any train trip longer than 1 hour (such as Casablanca to Marrakech or Fes to Marrakech), always book First Class. Second Class cars do not assign seat numbers—if the train is crowded, you may have to stand in the corridor with your luggage for several hours.
4. Al Boraq High-Speed Train: What You Need to Know
Inaugurated in 2018, Al Boraq is a flagship double-decker high-speed train built in partnership with France's SNCF (using modified TGV Euroduplex trainsets).
[Tangier-Ville] ──(45m)──► [Kenitra] ──(35m)──► [Rabat-Agdal] ──(50m)──► [Casa-Voyageurs]
• Max Speed: 320 km/h (200 mph) • Total Transit Time: 2 Hours 10 Minutes
Essential Al Boraq Tips:
- Departure Stations: In Tangier, departures are from Gare de Tanger-Ville. In Rabat, use Gare de Rabat-Agdal (not Rabat-Ville). In Casablanca, departures are from Gare de Casa-Voyageurs (not Casa-Port).
- Luggage Restrictions & Overhead Storage: Each passenger is officially permitted two large suitcases (up to 30 kg each) and one personal backpack or daypack. Large luggage racks are situated near the doors of each carriage, and deep overhead racks run above passenger seats. Luggage tags with your name and phone number are theoretically required.
- First-Class Station Lounges (Salon Grand Voyageur): First Class Al Boraq ticket holders enjoy complimentary access to dedicated VIP lounges at Tanger-Ville, Rabat-Agdal, and Casa-Voyageurs. Lounges offer leather armchairs, quiet air conditioning, high-speed Wi-Fi, and electronic flight/train display screens.
- Onboard Dining & Café-Bar Car: Every Al Boraq train features a dedicated bistro car located in Carriage 4. You can purchase fresh espresso (15 MAD), Moroccan mint tea (12 MAD), bottled mineral water (8 MAD), hot paninis, croissants, and snacks.
- Advance Booking & Dynamic Fares: Unlike conventional trains, Al Boraq uses dynamic yield management pricing (similar to French TGVs). Booking 3 to 7 days in advance yields the lowest promotional fares (~150 MAD for 2nd class vs ~240 MAD at peak hours).
5. Connecting from Trains to the Sahara Desert
A very common point of confusion among first-time visitors is expecting to take a train directly into the Sahara Desert.
┌─────────────────────────────────────────────────┐
│ THE SAHARA RAIL REALITY │
├─────────────────────────────────────────────────┤
│ [Tangier / Fes / Casa] ──(Train)──> [Marrakech]│
│ [Marrakech] ──(NO TRAIN EXISTS)──> [Merzouga] │
│ Distance: 560 km across High Atlas Mountains │
│ Solution: Private 4x4 Tour or Supratours Bus │
└─────────────────────────────────────────────────┘
Because the High Atlas and Anti-Atlas mountain ranges form a massive geological barrier, the rail network stops at Marrakech. To reach the authentic Erg Chebbi dunes in Merzouga, you have three options:
- Book a Private 3-Day or 4-Day Desert Tour (Recommended): Your driver picks you up directly at your Marrakech or Fes hotel, takes you through Aït Benhaddou and Dadès/Todra Gorges in a comfortable private 4x4, and delivers you directly to your luxury desert glamping camp.
- Supratours Desert Bus: ONCF's subsidiary bus company, Supratours, operates a daily direct overnight coach from Marrakech Railway Station to Merzouga village (approx. 12 hours, ~260 MAD).
- Casablanca to Errachidia Flight: Fly 1 hour from Casablanca (CMN) to Errachidia Airport (ERH) via Royal Air Maroc, followed by a 1.5-hour private transfer to Merzouga.
[!TIP] Planning Your Route Beyond the Train Network? Calculate driving hours and custom mountain stops with our free interactive Sahara Route & Drive-Time Estimator.
Frequently Asked Questions (FAQ)
Can I buy ONCF train tickets on the day of travel?
Yes. For conventional Al Atlas trains (like Casablanca to Marrakech), tickets rarely sell out completely and can be purchased at station ticket machines 30 minutes before departure. For Al Boraq high-speed trains, advance booking is recommended to secure First Class seats and lowest fares.
Do ONCF trains have Wi-Fi?
Al Boraq high-speed trains feature onboard Wi-Fi in both classes. Conventional Al Atlas intercity trains generally do not have Wi-Fi, but 4G/5G cellular data coverage (Maroc Telecom and Orange) is reliable along almost the entire railway corridor.
How early should I arrive at the train station in Morocco?
Arrive 20 to 30 minutes before departure if you already have your printed/electronic ticket. If you need to purchase tickets at the station or collect luggage, arrive 45 minutes prior.
What is the difference between Casa-Voyageurs and Casa-Port stations?
- Casa-Voyageurs: The primary transit hub for long-distance intercity trains, Al Boraq high-speed trains to Tangier, and connections south to Marrakech.
- Casa-Port: The downtown harbor station serving regional commuter lines to Rabat and Kenitra.
Are Moroccan trains safe for solo female travelers?
Yes. Moroccan trains are very safe and widely used by local families, students, and professionals. First Class compartments are quiet and respectful. Uniformed ONCF train conductors (contrôleurs) patrol the cars regularly.
Seamless Desert Travel with MerzougaWay
Connecting between Morocco's imperial cities and the Sahara Desert has never been easier. MerzougaWay provides premium private transfers, custom desert expeditions, and seamless door-to-door pickups from all major rail hubs.
- Explore Tour Packages from Rail Hubs:
Contact Our Travel Specialists:
- WhatsApp: +212 675 203 319 / +212 668 534 981
- Email: [email protected]
Sahara Route & Drive-Time Estimator
Calculate realistic driving hours across the High Atlas (Tizi n'Tichka pass), compare scenic stops (Dadès, Todra, Ziz), and plan your custom desert itinerary.
MerzougaWay Team
We are a passionate team of local guides dedicated to sharing the beauty and culture of our home, Morocco. Our journey began with a simple desire to offer authentic, memorable experiences that go beyond the typical tourist trails.


