# Rail transport in Morocco

Rail transport in Morocco is operated by the national railway operator ONCF. It was initially developed during the protectorate.

## High speed rail

On 26 November 2018, the first high-speed rail line linking Casablanca and Tangier was launched. It is called Al Boraq (البُراق) in reference to the mythical creature that transported the Islamic prophets. This 323-kilometer-long (201 mi) high-speed rail service is operated by the ONCF. The first of its kind on the African continent, the line was inaugurated on 15 November 2018, by King Mohammed VI of Morocco following over a decade of planning and construction.
The line is constructed in two sections—a new route from Tangier to Kenitra and an upgrade of the existing route from Kenitra to Casablanca. The 186-kilometre-long (116 mi) Tangier–Kenitra line has a top speed of 320 kilometres per hour (200 mph), while the 137-kilometre-long (85 mi) Kenitra–Casablanca line was rated for 160 kilometres per hour (99 mph) when service began, with a planned upgrade to 220 kilometres per hour (140 mph). The trackage from Kenitra to Casablanca is planned to be eventually replaced by a new high-speed right of way, with construction scheduled to begin in 2020.
At the launch of service in 2018, the travel time between Casablanca and Tangier was reduced from 4 hours and 45 minutes to 2 hours and 10 minutes. The completion of dedicated high-speed trackage into Casablanca would further reduce the end-to-end travel time to 1 hour and 30 minutes. Al Boraq trains are scheduled to depart Casablanca and Tangier every hour from 06:00 until 21:00 (from 07:00 on Sundays).
| Route | Travel time on the old classic railway | Travel time in 2018 | Travel time in 2020 |
| Tangier-Kenitra | 3h15 | 50 min | 47 min |
| Tangier-Rabat | 3h45 | 1h20 | 1h00 |
| Tangier-Casablanca | 4h45 | 2h10 | 1h30 |
| Rabat-Casablanca | 55 min | 50 min | 30 min |
As of 2019, the rolling stock operating on the line consists of 12 Alstom Euroduplex trainsets, with each set comprising two power cars and eight bilevel passenger cars. The passenger capacity is 533 across two first-class cars, five second-class cars, and a food-service car.
The Tangier - Casablanca line is the first phase of what is planned to eventually be a 1,500 kilometers (930 mi) high-speed rail network in Morocco.

## Main connections

The main network for passenger transport consists of a North–South link from Tangier via Rabat and Casablanca to Marrakech and an East–West connection linking Oujda in the East via Fes to Rabat. The North–South and East–West links interconnect at Sidi-Kacem. Major destinations currently not linked by rail are usually served by Supratours, a bus company operated by the ONCF.
The most important long-distance train services are:
| From: | To: (and vice versa) | via / change at: | traveltime | Number of trains per day |
| Casablanca | Tangier | Al-Boraq trains stop at Rabat-Agdal and Kenitra | 2h10m | 14 x |
| Casablanca | Fes | – | 3h20m | 18 x |
| Casablanca | Oujda | direct or via Fes | 10h | 3 x (one of them night-train) |
| Casablanca | Nador | direct (1x), via Fes or with transfer in Taourirt | 8h30m up to 10h | 4 trains/day of which 2 are night-trains |
| Marrakech | Fes | – | 7h10m | 8 x |
| Marrakech | Tangier | via Casablanca Voyageurs | 9h30m | 6 x one direct night-train |
| Tangier | Oujda | direct link at daytime night-train change at Sidi Kacem | 10h20m (day) 10h35m (night) | one day train, one night-train |
| Nador | Taourirt | gives connection to E–W mainline | 1h42m | 3 x (the direct night-train to/from Casablanca doesn't stop in Taourirt) |
| Casablanca | Oued Zem | – | 3h | 1 x |
| Casablanca | El Jadida | – | 1h25 | 8x |
| Safi | Benguerir | gives connection to N–S mainline | 2h | 2x |

## Night trains

The ONCF operates special night-trains on the long-distance main-line links. The following routes offer night-trains:
   * Marrakech–Tangier section
   * Casablanca–Oujda section
   * Casablanca–Nador section
   * Tangier–Nador section
These long-distance trains operate with non-motorized passenger cars that have individual compartments. Second class compartments have two couches opposite each other, each couch offering 4 places. In first-class cars, each compartment offers 2 × 3 places and foldable arm-rests divides the places. In 1st class, each passenger has a reserved assigned seat.
Each compartment has its own door to the aisle and curtains can be drawn to keep the compartment dark. In the night-trains, passengers in a 2nd class compartment tend to draw the curtains, switch off the lights and close the sliding door, hoping that no passengers will enter their compartment so the existing cabin passengers might have more space. In 1st class, however, each seat is manually assigned. Thus, the system is not used.
When trains are not busy, couches are usually empty, so passengers can lie down at times.
Besides these 'normal' compartments (that are also used on day-time trains and special night-trains) they also offer sleeper-cars with bedrooms/compartments or couchettes. A bed or couchette has fixed price, regardless of the travelling route or distance. Beds and couchettes have to be reserved when tickets are brought.
Bed and couchette-prices Moroccan trains :
| Type | persons | Adult | Child (up to 12 years old) (accompanied by an adult) |
| Bed | 1 | Dh. 600 | Dh. 490 |
| Bed | 2 | Dh. 450 | Dh. 340 |
| Couchette | 4 | Dh. 350 | Dh. 280 |

### Marrakech–Tangier section

There is a daily train on the Marrakech-Tangier section in each direction. On this route, standard 6 or 8-person compartments are available, as well as 4-person couchette compartments.
Timetable for this section: Northbound: Marrakech (21:00), Casablanca Voyageurs (0:45), Rabat-Ville (1:57), Kentira (2:37), Sidi-Kacem (3:33), Tangier (7:25). Southbound: Tangier (21:05), Sidi-Kacem (1:30), Kentira (2:35), Rabat (3:15), Casablanca (4:30), Marrakech (08:05).

### Casablanca–Oujda section

Besides normal running trains, this section also runs a special hotel train service. This train only offers reserved sleeping compartments, compared to other normal services. The train service opened on 29 June 2010. It featured in the James Bond film Spectre.
Timetable for this section: Westbound: Oujda 21:00, Taourirt (22:43), Fez (3:00), Kentira (4:30), Rabat (6:15), Casablanca-Voyageurs (7:15) Eastbound: Casablanca-Voyageurs (21:15), Rabat (22:23), Kentira (22:51), Fez (1:30), Taourirt (5:03), Oujda (7:00). Hotel train service timetable: Northbound: 21:00 Oujda-Casablanca Southbound: 21:15 Casablanca-Oujda

### Casablanca–Nador section

Nador is not the start or terminus; trains run from/to nearby Bin Anşār or Nador Port. The night-train on this route only offers 2 person sleeping compartments with full beds. No couchettes are available. As the train does not go to Taourirt, there is no need to change driving-direction and thus no need to move the engine. The day trains all stop at Taourirt and as the link to Nador is actually before the station of Taourirt (coming from Fes) the direction of travel has to change, including moving the locomotive from one end to the other.
Timetable for this section: Westbound: Nador (19:43), Fez (1:00), Casablanca (06:15). Eastbound: Casablanca (19:45), Fez (0:15), Nador (06:00).

### Tangier–Nador section

Trains on this section normally run to and from Bin Anşār or Nador Port.
Timetable for this section: Northbound: Nador (17:43), Fes (23:00), Tangier (07:00) Southbound: Tangier (21:35), Fes (2:30), Nador(09:32).

## Urban
### Light rail

* Casablanca tramway
* Rabat–Salé tramway
* Marrakech tramway [fr] (proposed)
* Tangier tramway (2 lines project, 25 km, 8.4 billion MAD)

### Heavy rail

* Train Navette Rapide : Rapid transit rail (since 1984) from Rabat to Casablanca extended to Kenitra and Settat (200 km);
** Casablanca Airport rail link (30 km, since 1993);
** Casablanca – El Jadida Rapid transit line (100 km, since 2002);
* Al Bidaoui : Casablanca overground rail (since 2002);
** Casablanca RER line (RER 63 km mass transit rail including 9 km underground rail, planned for 2020)
* Le Bouregreg : Rabat overground rail (since 2012);

## Projects

The national railway-operator ONCF is working on several projects. The largest project is a high-speed railway from Tangier via Rabat and Casablanca to Marrakech. Also a (passenger) rail connection between Tangier and Tangier MED, the port on the Mediterranean near Tangier, will give passengers arriving by ferry a connection to the main lines. A train will operate every 2 hours between the port and Tangier city. A freight-line from the Renault factory at Tangier MED is already operational The Marrakech to Agadir railway is also planned to be completed by 2025, becoming the first rail line to reach the southern Souss-Massa region.

## Railway links to adjacent countries

* Algeria, route has been closed since the 1990s – tracks use same gauge 1,435 mm (4 ft 8+1⁄2 in)
* Gibraltar (UK), no connection; a ferry service connects Gibraltar to the Tanger-Med port and railway station
* Spain: Since 2003, the creation of a direct link with Spain via a railway tunnel under the Strait of Gibraltar has been studied. This tunnel would connect the Moroccan rail infrastructure with the European one via Spain. In Tangier the tunnel would connect to the currently-being-built High Speed Line Tangier-Marrakech.
* Western Sahara: Via the proposed network-extension from Marrakech via Guelmim to El Aaiún would connect Morocco to the Western Sahara. Currently, ONCF daughter-company Supratours operate bus routes from Marrakech to Western Sahara, such as Tan-Tan or Laâyoune. Morocco claims Western Sahara as part of Morocco and thus as national routes.
* Mauritania: A 5-kilometre (3.1 mi) section of the Mauritania Railway; which (since the closure of the Choum Tunnel), cuts across the extreme south-eastern corner of Western Sahara.