Travel Logistics

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.

Hamid Bouragaa & MerzougaWay Team
10 min read

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:

  1. 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).
  2. 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.
  3. 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.
  4. 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.
  5. 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:

  1. 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.
  2. 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).
  3. 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.

Contact Our Travel Specialists:

Free Interactive Tool

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

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.

What Our Travelers Say

Real reviews from Google and TripAdvisor

MA
Manuela Ardila
Family trip · Google

We traveled to Morocco in a group of 6 adults, including my parents, who are already seniors, in the middle of summer. For my family it was a leap of faith to trust an agency we found online for the first time, but it turned out to be a wonderful surprise. Hamid, the trip organizer, was very kind and attentive both before and throughout the whole tour. It was a fully personalized tour - we got to do everything we wanted, from visiting the Sahara to enjoying the beach. He always looked out for our comfort, especially my parents': comfortable transport, well-timed stops at places with restrooms, beautiful air-conditioned hotels, and varied, plentiful food. Thanks to his organization we were able to enjoy the trip with real peace of mind. It was a great experience we would absolutely recommend.

CG
Carlos Guitian
Self-drive trip · Google

Last week I did a self-drive trip from Fes to Merzouga, leaving the car rental, the riad in Merzouga, the desert camp, and the guided desert activities all in the hands of MerzougaWay and Hamid, and I can only say that everything was perfectly organized, right on time. Thanks to everyone at the riad we stayed at and the desert camp, as well as the guides who joined us for the 4x4 experience, Berber culture, and the camel transfer. Thanks to Hamid and MerzougaWay for that quad-bike ride back to the riad from the camp - what an experience, riding a quad across the dunes early in the morning. If you're thinking of traveling to Merzouga, I definitely recommend Hamid as the organizer of your adventure.

FK
Flor K
Apr 2026 • Friends · TripAdvisor

Excellent!! We loved the tour. Thank you Hamid for everything. Everything well organized, the guide Eljo (Elhousain) was very attentive, highly recommend. Everything super clean, we had a great driver, we felt very safe with him. Unbeatable desert excursion. Thanks MerzougaWay!

OK
Oguzhan K
Mar 2026 • Couples · TripAdvisor

Trustworthy tour agency. I wrote Hamid what I wanted and he just made it happen. He arranged everything so quick and smooth. We had a 3-day Merzouga tour from Marrakech. Said was our guide and he made me and my wife very comfortable. He took us from our riad and carried us in his modern 4x4 Toyota to magnificent places. He gave us the confidence to ask him whatever we wanted to do and wherever we wanted to drive - like old friends. He is open-minded and respectful. I recommend asking the agency for Said to be your driver. In the 3-day tour you cross the Atlas mountains, stay one night in a perfect hotel in Dades with great food, then stay one night in Erg Chebbi dunes in a luxury glamp camp. One night wasn't enough for a real desert experience - if you have time, take two nights in the desert.

SB
Sara B
Mar 2026 • Friends · TripAdvisor

Unforgettable holiday. An 8-day itinerant tour in Morocco, including 3 days organized by Hamid - MerzougaWay: a route from Fes to Marrakech, spending a night in the desert and in Ouarzazate. Our guide Youssef, who drove us all along the way, was very professional and took us to try real experiences that not all tourists get to see. Breathtaking landscapes - Morocco amazed and fascinated us. We drove many miles but still traveled comfortably. Absolutely recommend it - they are a highly professional agency and managed to take us to unique places, like a Berber village in the desert where we were the only tourists. A spectacular, unforgettable experience.

S
Simona
Mar 2026 • Friends · TripAdvisor

Morocco from the heart with MerzougaWay. Heartfelt congratulations to Hamid, who organized our trip impeccably - present, correct, and extremely helpful. A special mention for our driver Ali, who was by our side through 3 intense days toward the desert: attentive, polite, discreet, and a genuinely good, nice driver. We found snow in the Atlas range and then sun in Ait Ben Haddou, visited women's cooperatives working argan oil and roses, saw the Dades Gorges, and finally reached the Sahara dunes by camel before sleeping in a tented desert camp. 3 intense and exciting days. Next time in Morocco I'll rely on you again, inshallah!

Read more reviews on

Ready to Start Your Adventure?

Contact us today and let's plan your perfect Moroccan desert experience

Recommended Tours

Book your Morocco desert adventure

Related Posts

8 min read
Everything you need to know about driving in Morocco as a foreigner: Police checkpoint rules, radar traps, parking guardiens, Tizi n'Tichka safety, and local laws.
7 min read
The complete 1-2 day Chefchaouen travel itinerary for 2026. Discover the top photo spots, why the city is blue, the Spanish Mosque sunset, and Akchour Waterfalls.
8 min read
The definitive 1-2 day Essaouira travel guide for 2026. Explore Skala sea ramparts, fresh port seafood grills, kitesurfing beaches, thuya wood souks, and riads.