
The Al Atlas to Oujda
Kabelleger / David Gubler / Wikimedia Commons · CC BY-SA 3.0 · cropped
- DistanceCasablanca–Fès–Oujda · the width of northern Morocco
- DurationAbout 10 hours, by day or overnight
- Best seasonAll year · spring and autumn are kindest on the high plains
Introduction
Morocco's main line does not end at the sea or at a capital. It ends at Oujda, fifteen kilometres from Algeria, at a border that has been closed to all travel since 1994.
Twice a day ONCF's Al Atlas trains make the whole run from Casablanca: the day train leaves Casa Voyageurs at 06:40 and reaches Oujda at 17:07, and the night train leaves at 21:07 and gets in at 07:11. Two more come through from Tangier on the classic line. They run up the Atlantic coast to Rabat and Kénitra, turn inland at Sidi Kacem, call at the imperial cities of Meknès and Fès, then leave the wires behind and climb through the Taza Gap onto the high, dry plains of the east.
A railway built from the other end
The rails reached Oujda from Algeria first. The Algerian line from Tlemcen was extended across the frontier and opened into Oujda on 5 October 1911, more than twenty years before Oujda could be reached by train from the rest of Morocco. When the line from Fès opened on 1 April 1934, it completed a single railway along the north of the Maghreb, from Casablanca through Oran and Algiers to Tunis, and trains ran between Casablanca, Oran and Algiers.
In 1994 the border closed, and the through trains stopped with it. Akid Abbes, the Algerian station on the other side, has had no passenger train since. At the far end of that old route, beyond Algeria, a passenger train does cross a frontier again: Tunis to Annaba is the other half of the story.
What kind of journey this is
An ordinary intercity train, in first or second class, with a single-bed compartment on the night train. It is long — about ten hours end to end — and most of the second half is open country: the valley of the Moulouya, olive groves around Guercif, dry hills towards Taourirt. You arrive at the point where the railway, and the road, simply stop.
The Journey
The day train, 103, leaves Casa Voyageurs at 06:40. The first hour runs up the coast to Rabat Ville (07:41) and Kénitra (08:17), on the electric line every Al Atlas train out of Casablanca shares.
Inland to the imperial cities
At Sidi Kacem (09:06) the line from Casablanca meets the line from Tangier — the junction where Morocco's north–south and east–west routes cross — and the train turns east. Meknès comes at 09:57, the city Moulay Isma'il made his capital in the 17th century, and Fès at 10:41.
Where the wires end
Fès is where the electric railway stops. The eastern line was left out when Morocco electrified its network in the 1920s and 30s, and the work is still in the government's rail programme for 2027, so east of here the train is hauled by a diesel. For many years that meant ONCF's DH 350 class — American-designed EMD GT26CW-2 locomotives; in 2011 the day train was photographed swapping its electric engine for one of them at Fès. In 2026 ONCF shipped new electro-diesel locomotives from CRRC Ziyang in China, intended for the Fès, Nador and Oujda lines.
Through the Taza Gap
East of Fès the line runs past the Idriss I reservoir — the lake in the photograph at the top of this page — into the gap between the Rif to the north and the Middle Atlas to the south. Taza (13:38) stands on its terraces above the valley; the walled old town is at 585 metres.
The high plains of the east
Beyond Taza the country opens and dries. Guercif (14:32) sits on the left bank of the Moulouya, Morocco's great Mediterranean river, among olive groves. At Taourirt (15:16) the branch to Nador and the coast leaves to the north. El Aioun (16:16) is the last stop.
Oujda
Oujda at 17:07. A city of half a million, founded in 994, with a walled medina, and the end of the line. The track runs on towards the border, but no train uses it.
Practical notes for the ride
- Take food and water. It is a ten-hour day, and nothing published by ONCF promises a catering service on this train.
- The night train is the time-saver: Casablanca at 21:07, Oujda at 07:11, and back from Oujda at 21:45.
- Coming from Tangier, trains 301 (07:40) and 303 (11:50) run through to Oujda without a change.
- There is no way on into Algeria by train or road. Plan the return.






Along the route
Industrial Wales / Wikimedia Commons · CC BY-SA 2.0 · croppedWhere the wires end
The line is electric as far as Fès. East of it the railway was left out of the electrification of the 1920s and 30s and is still waiting, so a diesel takes over: for years ONCF's American-designed DH 350 class, with new Chinese-built locomotives shipped in 2026.
Wimmiden / Wikimedia Commons · CC BY-SA 3.0 · croppedThe Taza Gap
Beyond Fès the train climbs into the corridor between the Rif and the Middle Atlas. Taza, long a trading town on the route from Fès to the Algerian frontier, sits on two terraces above the valley, the old town walled at 585 metres.
Bilal026 / Wikimedia Commons · CC BY-SA 3.0 · croppedThe Moulouya at Guercif
Guercif stands on the left bank of the Moulouya, a 520-kilometre river that rises in the Middle Atlas and reaches the Mediterranean near Saïdia. The plain around it calls itself Morocco's olive capital, with more than 60,000 hectares of groves.
hakzelf / Wikimedia Commons · CC BY 2.0 · croppedThe last call before a closed frontier
El Aioun is the final stop, fifty minutes out. Beyond Oujda the track runs on towards Algeria and goes unused: Akid Abbes, the Algerian station across the border, has seen no passenger train since the frontier shut in 1994.A bit of history
Culture & experiences along the way
Kabelleger / David Gubler / Wikimedia Commons · CC BY-SA 3.0 · croppedA bed across the country
The night train leaves Casa Voyageurs at 21:07, passes Fès at one in the morning and reaches Oujda at 07:11. ONCF sells it in seats or in a single-bed compartment, 670 dirhams one way; it warns that the bed is not available on every trip and offers first class instead.
Bjørn Christian Tørrissen / Wikimedia Commons · CC BY-SA 3.0 · croppedThe Bou Inania Madrasa
Built in Fès in 1350–55 by the Marinid sultan Abu Inan Faris, it is the only madrasa in Morocco that also served as a congregational mosque, and a high point of Marinid building: a courtyard of carved stucco, zellij tilework and carved wood, with student rooms above and a water clock on the street outside.
Oumaima Loudini / Wikimedia Commons · CC BY 4.0 · croppedThe cedars of Jbel Tazekka
South of Taza, Tazekka National Park was created in 1950 to protect the Atlas cedars on Jbel Tazekka, 1,980 metres high, and extended in 1989 to almost 120 square kilometres of cork and holm oak, canyons and caves. The Barbary stag, once extinct here, has been brought back.Timetables
The times below are from ONCF's own booking engine, read for Wednesday 2 December 2026 and checked again for Thursday 10 December, which gave the same trains at the same times. All trains are Al Atlas services and run daily.
Casablanca to Oujda
| Station | Train 103 (day) | Train MA (night) |
|---|---|---|
| Casa Voyageurs | 06:40 | 21:07 |
| Rabat Ville | 07:41 | 22:11 |
| Kénitra | 08:17 | 22:48 |
| Sidi Kacem | 09:06 | 23:44 |
| Meknès | 09:57 | 00:30 |
| Fès | 10:41 | 01:07 |
| Taza | 13:38 | 03:57 |
| Guercif | 14:32 | 04:52 |
| Taourirt | 15:16 | 05:32 |
| El Aioun | 16:16 | 06:24 |
| Oujda | 17:07 | 07:11 |
10 hours 27 minutes by day, 10 hours 4 minutes overnight.
Tangier to Oujda
Two trains run through from Tanger Ville on the classic line, without a change: 301 at 07:40, which leaves Fès at 12:55 and reaches Oujda at 18:50, and 303 at 11:50, arriving at 22:23.
Oujda back west
| Train | Leaves Oujda | Fès | Arrives |
|---|---|---|---|
| 202 | 07:50 | 13:40 | Tanger Ville 18:41 |
| 204 | 11:35 | 17:29 | Tanger Ville 22:41 |
| 206 | 13:35 | 19:02 | Casa Voyageurs 23:45 |
| AM (night) | 21:45 | 03:17 | Casa Voyageurs 07:55 |
From train 202 you can also change at Fès onto train 126 (14:35), which reaches Casa Voyageurs at 18:39.
Practical
- Every train above runs every day.
- The single-bed compartment is sold on the night trains only, and not on every date.
Operator: ONCF — timetables and booking at oncf-voyages.ma (opens in a new tab). Times above as of November 2026.
Tickets
ONCF sells every ticket, online at oncf-voyages.ma (opens in a new tab) or at the station, in Moroccan dirhams. Fares move with demand and with how flexible the ticket is. For Casablanca to Oujda on 2 December 2026 ONCF asked 99 dirhams in second class for a ticket that cannot be changed, 155 for one exchangeable once, and 235 fully flexible; first class was 260 or 390.
On the night train a single-bed compartment was 670 dirhams each way. Between Fès and Oujda second class starts at 49 dirhams, and between Oujda and Tangier at 160.
Book your tickets

Casablanca to Oujda · train 103
The day train, first or second class
Leaves Casa Voyageurs at 06:40 and reaches Oujda at 17:07, sold by ONCF online or at the station.
Book Tickets (opens in a new tab, on ONCF)via ONCF
The night train · MA and AM
Seats or a single-bed compartment
Casablanca 21:07 to Oujda 07:11, and back from Oujda at 21:45, with a single bed from 670 dirhams.
Book Tickets (opens in a new tab, on ONCF)via ONCF
From Tangier · trains 301 and 303
Through trains on the classic line
Tanger Ville at 07:40 or 11:50, through Fès to Oujda in about eleven hours, without changing.
Book Tickets (opens in a new tab, on ONCF)via ONCFRail Passes
No rail pass covers this journey. ONCF sells each trip as a ticket, and the full run from Casablanca to Oujda costs less than a hundred dirhams in second class on a non-changeable fare.
Checked November 2026.
Places to Visit
The two imperial cities come first, and each deserves a night of its own. East of Fès the stops thin out, but Taza and the Tazekka mountains are worth breaking the journey for, and Oujda rewards the people who make it all the way to the end.
Bernard Gagnon / Wikimedia Commons · CC BY-SA 3.0 · croppedMeknès and the granaries of Moulay Isma'il
Moulay Isma'il, sultan from 1672 to 1727, made Meknès his capital and built an imperial kasbah beside the old town. Its granary, the Heri es-Souani, is a forest of arches joined to the House of the Ten Norias, which lifted water for the palaces from the water table. It is often called the Royal Stables; the stables were in fact a separate building further south.
Hiroki Ogawa / Wikimedia Commons · CC BY 3.0 · croppedFès el Bali
The oldest part of Fès, founded as the Idrisid capital between 789 and 808, still keeps its pre-modern street plan, market lanes and long stretches of city wall. At its heart is the al-Qarawiyyin, centred on a 9th-century mosque, with the Chouara tanneries nearby. UNESCO listed it with Fès Jdid as the Medina of Fez in 1981.
Yamen / Wikimedia Commons · CC BY-SA 4.0 · croppedOld Taza
Taza began as Ribat Taza, a military camp, and passed to the Almoravids in 1074, the Almohads in 1132 and the Marinids in 1248. The old town sits on its own terrace above the new one, inside its fortifications, with Berber monuments, mosques and a 14th-century madrasa. It fell to the French in 1914.
Wimmiden / Wikimedia Commons · CC BY-SA 3.0 · croppedThe Friouato caves
In the limestone above the Daya Chiker basin, on the edge of Tazekka National Park, the Friouato caves drop 272 metres through chambers, narrow tunnels and natural bridges hung with stalactites and stalagmites. An underground river runs for almost four kilometres beneath them.
Farajiibrahim / Wikimedia Commons · CC BY-SA 4.0 · croppedThe walls of Oujda
Oujda was founded in 994 by Ziri ibn Atiyya near the plain of the Angad. The Almohads walled it in 1206; the Marinids razed it in 1271 and rebuilt it in 1295 with new ramparts, a kasbah and a mosque. French troops took it in 1907. The medina's walls still stand, fifteen kilometres from Algeria.Where to Sleep
The timetable decides where you sleep: the day train leaves Casablanca at 06:40, and Oujda is a dead end, so unless you take the night train straight back, you sleep there.
Casablanca
Stay within easy reach of Casa Voyageurs: the day train leaves at 06:40, before the city is properly awake.
Fès and Meknès
Breaking the journey is the best way to do it. In Fès el Bali, restored riads — courtyard houses turned into small guesthouses — put you inside the medina. Both cities are on every train, so you can stop off and pick up the next one.
Oujda
The day train gets in at 17:07; the next train west leaves at 07:50 the following morning.
The night train
The single-bed compartment on train MA is the hotel: board at Casablanca at 21:07 and wake up in Oujda. Book it early — ONCF says it is not available on every trip.
Questions or corrections
Planning this trip and stuck on something, or spotted a time, fare or detail that has changed? Send us a message about The Al Atlas to Oujda. We read every one, and we update this page when something has changed.