Morocco Trains

Morocco's national rail network, operated by ONCF, spans 4,225 km and connects all major cities with reliable, air-conditioned train services. The high-speed Al Boraq runs Tangier to Casablanca in 2h10 and Tangier to Rabat in 1h20 at speeds up to 320 km/h — the first high-speed rail service launched in Africa in November 2018. Regular Al Atlas trains cover popular routes like Casablanca–Marrakech (~3h), Casablanca–Fes (~4h), and Casablanca–Rabat (~1h), running every 1–2 hours daily. Second class tickets start from around 5 EUR, first class from 10 EUR, Al Boraq from 28 EUR. You can buy tickets online at oncf-voyages.ma up to 6 months in advance, or book tickets via Rail.Ninja — the transaction takes under 3 minutes. Children aged 0–3 travel free. Train travel in Morocco is safer and more comfortable than traveling by road, and a popular choice for both locals and international travelers.

Popular Routes

Want to embark on a new journey? Check the most popular Morocco train routes and begin your journey today by booking the ticket online.​

ONCF Trains

Choosing ONCF trains, you get the most out of Morocco since it's one of the most comfortable means of travel. Book tickets online by selecting the schedule, route, train type, and departure type. ​

Coach Classes

The ONCF trains boast immense comfort and facilities. Hence, you get the chance to enjoy the most exciting ride!​

About Morocco Trains and ONCF

Morocco has some of the best-kept secrets in the world — a beautiful country with a rich cultural history, stunning natural landscapes, and a thriving travelers industry. ONCF trains are appreciated by locals and tourists alike for their reliability and comfort. You can book online up to six months before your departure, choose your class, select your seat, and enjoy the journey from large panoramic windows. Whether taking a day trip between nearby cities or a longer overnight journey, trains are the most popular and convenient way to travel across Morocco.

In addition to its rail network, ONCF works with Supratours buses to serve cities not currently on the rail line. The network is generally based on French-built infrastructure and continues to grow, with new lines planned to eventually link Marrakech and Agadir to the high-speed network.

Al Boraq High-Speed Rail

Al Boraq is Africa's first high-speed train, launched in November 2018. It runs at up to 320 km/h, connecting Tangier Ville to Kenitra, Rabat, and Casablanca. Trains run every hour, making it easy to find a departure time that fits your itinerary. Al Boraq offers reserved seating throughout and includes a cafe-bar car — a great way to enjoy the journey. The new line has built a reputation as the fastest and most comfortable way to travel between these cities. All seats are sold in advance, so it's important to book early, especially on popular weekend departures.

Al Atlas Regular Trains and Overnight Services

Al Atlas trains serve the broader ONCF network, connecting Casablanca, Marrakech, Fes, Fez, Meknes, Kenitra, Rabat, Tangier, and Oujda. First class offers 6-seat compartments with reserved seats — a comfortable option for longer trips; second class provides padded seats in open coaches, the most popular choice among budget travelers and locals. Both classes offer air conditioning, large windows, and plenty of legroom compared to buses.
For longer routes like Tangier to Marrakech (5h14), ONCF runs overnight trains with couchette cars featuring 4-berth compartments. Taking an overnight train means you can save time on your itinerary and arrive at your destination well-rested. Double-deck trains run on the busy Rabat–Casablanca corridor, offering plenty of seating options throughout the day.

How to Buy Morocco Train Tickets

There are several ways to buy Morocco train tickets. The most popular option is to book online at oncf-voyages.ma or via Rail.Ninja — both websites let you search routes, view timetables, compare fares, select your seat, and complete the transaction in under 3 minutes. Payment options include credit cards and Apple Pay. You can also buy tickets directly at the station on the day of travel, though booking in advance is generally cheaper and means you won't need to worry about sold-out trains. E-tickets are issued instantly — no need to collect a physical ticket at the arrival station.
Children aged 0–3 travel free on all Morocco trains. Students and groups may find additional discounted options — check the ONCF website for details. If you need information about a specific route or want to contact ONCF directly, their website provides route-specific timetable and fare details by email and phone.

Popular Morocco Train Routes

The most popular Morocco train routes include Casablanca–Marrakech, Casablanca–Tangier, Casablanca–Rabat, Tangier–Marrakech, Fes–Casablanca, Kenitra–Tangier, and Meknes–Casablanca. Trains generally run every 1–2 hours on popular corridors, with plenty of departure times to choose from throughout the day. For travelers arriving by ferry from Europe or the UK, Tangier Ville station links directly to the Al Boraq line — a convenient connection to Casablanca, Rabat, and beyond.
Key stations served by the network include Casa Port, Rabat Ville, Rabat Agdal, Tangier Ville, Fes Railway Station, Marrakech Train Station, Kenitra-Medina, Meknes, and Sidi Kacem — all generally located in city centers, making it easy to start your journey without a long transfer. The total distance of Morocco's rail network spans 4,225 km, offering travelers an impressive range of routes across this beautiful country.

Frequently Asked Questions About Morocco Trains

Try the new Rail Ninja App today
Get our free app to book & manage your trips on the go
Rail Ninja App

Why You Can Trust Us

Easy Booking
If you're looking for an adventure, you can book your train tickets right away with a simple click of your mouse.
​Optimized & Secure Payments
When you purchase your train tickets online, you have a choice of 15+ options. It takes less than 3 minutes to select the most convenient payment method and complete your transaction!
High-Quality Amenities
While traveling by well-equipped train, you will be delighted by the excellent onboard service.