L’Office national des chemins de fer a été constitué le 1er janvier 1963 par le rachat des trois concessions qui reliaient l’ancienne capitale marocaine Fez à l’atlantique à l’ouest (Compagnie des chemins de fer du Maroc (CFM)), au réseau ferré algérien à l’est (Compagnie du chemin de fer du Maroc oriental (CMO)) et à la Méditerranée au nord (Compagnie franco-espagnole du Tanger-Fès (TF)), subsistant comme concessionnaires distincts pendant le protectorat, afin de fusionner l’exploitation de ces trois réseaux. L’ONCF est aujourd’hui membre de l’Union internationale des chemins de fer (UIC), de l’Union arabe des chemins de fer (UACF) et du Comité du transport ferroviaire maghrébin (CTFM).


Projects & Investments

Tangier-Casablanca high-speed line

Tomorrow’s mobility comes in stations

The project of construction of a High Speed Line linking Tangier to Casablanca is part of the policy of major projects initiated and conducted by His Majesty the King MOHAMMED VI May God Assist him. It is a system that, thanks to its various positive spin-offs, offers an innovative solution and a natural choice to boost national transport, favor multi-modality and preserve the environment.

This project is the first step in the implementation of a Master Plan for High Speed Lines for the gradual construction of a network of about 1500 km, consisting of the “Atlantic” Tanger-Casablanca-Agadir axis and the “Maghreb” axis Casablanca-Rabat-Fes-Oujda.

Triplement Casablanca-Kénitra

Plus de robustesse et de capacité
De par sa position stratégique dans la configuration du réseau ferré national, l’axe Casablanca-Rabat-Kénitra, qui relie le Nord, l’Est et le Sud du pays, constitue le cœur de l’activité ferroviaire au quotidien : une part prépondérante du trafic, aussi bien des navetteurs que des voyageurs grandes lignes, transite par cet axe porteur.
Cet axe enregistre un taux de saturation important, constituant une contrainte majeure quant à son exploitation et aux possibilités d’étendre l’offre pour faire face convenablement à la demande en croissance constante. De ce fait, l’augmentation de sa capacité et le renforcement de sa robustesse se sont imposés pour assurer une offre étoffée avec des services plus attractifs répondant au mieux aux attentes de la clientèle.

Lancé par Sa Majesté Le Roi Mohammed VI, Que Dieu Le Glorifie, en septembre 2012, ce projet comporte trois composantes majeures, à savoir :

Robustesse : Renouvellement de 100 km de voie et de 160 km de lignes caténaires, réhabilitation du tunnel de Rabat Ville
Sécurité et sûreté : Remplacement des passages à niveau par des ponts, clôture de la totalité du parcours
Triplement de la voie : Terrassement et ouvrage d’art sur 100 km, construction de 6 ponts routes, de 4 viaducs, de 21 ponts rails et de 11 passerelles, construction et renforcement de 15 sous-stations, pose de 100 km de voie et caténaire, modernisation et automatisation des équipements et installations de signalisation.
Objectifs du projet
Répondre à l’évolution croissante (plus de 50%) du trafic voyageurs et fret transitant par cet axe
Améliorer la gestion des circulations et la qualité du service offert
Augmenter la capacité de l’offre ferroviaire, tout en modernisant les installations techniques
Renforcer la sécurité et la sûreté  sur cet axe.

Doubling complete Casablanca-Marrakech

Gains in capacity and travel time
Over the years, the demand for rail transport on the Casablanca-Marrakech axis has steadily increased with double-digit rates, following the socio-economic, tourist and cultural dynamism that have marked these two agglomerations, thus giving rise to to increased mobility.
In order to support this evolution, the project of the complete doubling of this line has been implemented in two phases to increase the capacity of the line and further improve its competitiveness.

The first phase was completed in December 2013: renewal of 80 km of track and 140 km of catenary lines, doubling of the track over 34 km and construction of a freight station in Sidi Ghanem
The second phase consists in a doubling of the entire railway linking Settat to Marrakech over 140 km, the improvement of the route over 40 km, the construction of two viaducts with a length of 350 m, the removal of all level crossings and their replacement by works of art (numbering 60) as well as the reinforcement and construction of the electrical substations.
Respond to customer expectations and cope with growing demand
Reduce travel time while improving the quality of service
Increase the rate of trains and improve the level of regularity
Increase the supply for the transport of goods
Strengthen the safety and security of train traffic.

Structuring projects


In seven years, rail transport has seen a significant change in traffic, which has doubled, accompanied by a considerable increase in supply. This has been facing constraints related to network configuration and capabilities with the single track is quoted on unsolicited axes (Tangier / Kenitra and Settat / Marrakech) and saturation of the carrier axis Casablanca-Rabat-Kenitra .

Faced with these constraints, ONCF carried an ambitious investment program today by the national rail network an open site from Tangier to Marrakesh, while the proactive choice to keep the offers almost the same level.

The investment program in question concerns the main axes of the network and essentially comprises:

The project for the construction of the Tangier-Casablanca high-speed line currently undergoing operations preparation, which constitutes the first stage of a blueprint for the High Speed ​​Line covering a linear distance of about 1500 km.
Major structural projects to modernize the existing network
These projects, presented in more detail in the pages that follow, have reached important milestones and are currently in the completion phase.

The realization of these projects on operating infrastructures imposes speed limits, lengthening travel times and causes some delays that can be amplified by external elements. These factors weaken railway operations and any incident, whatever its origin, is reflected in a disruption of traffic.

Nevertheless, a great effort is made by the railway workers to carry out the work on the network in operation during the night to limit, as much as possible, the impact of the yards on the trains.

As soon as they come into service in 2018, these structuring projects will not fail to improve or even transform the railway offer, enhance safety, improve the quality of service and bring cities closer together by reducing travel times. Without forgetting, of course, their impact on the development of an ecosystem around rail, while boosting the activities of Moroccan companies and contributing to the creation of value and sustainable employment.

Security and safety

The crossing points of the railway with the road (Level Crossings: PN) constitute a permanent safety concern for all managers of railway networks and roads around the world. Crossing a crossing without respecting road signs or crossing the railway in open country without using the bridges and other structures designed for this purpose, is exposing oneself to an imminent danger that may cost the life.

To combat these behaviors with often dramatic consequences, the ONCF is part of a proactive approach to securing its railway rights of way. In this context, an ambitious program was presented to His Majesty King Mohammed VI, May God Assist him, on November 14th, 2012 in Benguerir, aiming at improving the security at the crossing of the FN.

The program in question focuses on the following areas:

The first consists of replacing 180 priority crossings (high traffic, both road and rail) by engineering structures (AO) or by adapting and diverting traffic to existing crossings.
The second axis concerns the securing of the crossing of the railway on the second priority PN, by equipping them with Automatic Announcement and Closure Systems (SAFA).
The third axis is user awareness
In support of this FN security program and to channel pedestrian users to secure crossing points, ONCF realizes fencing of railway rights-of-way and the construction of pedestrian bridges.
Improve safety when crossing PNs
Reduce the number of accidents to the right of PN
Reduce the number of accidents related to trespassing on railway rights-of-way
Make the public aware of the dangers and the duty to adopt a responsible and citizen behavior
Participate in the fluidification of traffic at PN level


Train stations, places of life
The station has become today a hub in the heart of the city. From a simple transit point of travelers, it has transformed into a place of life, conducive to relaxation, catering or shopping. These buildings blend harmoniously into the urban planning environment of cities and position themselves as a multifunctional space offering diversified services that best meet the expectations of travelers and visitors.

In an effort to provide innovative products and services, the Agency has embarked on an ambitious program to modernize and build railway stations, both large and medium-sized and small, marking a break with the traditional design of railway stations as mere transit of travelers.

Under this program, the ONCF proceeded during the period 2010-2017 with the modernization and the construction of 42 stations, having required a total envelope of more than 800 million dirhams. In the continuity of deployment of this program, several steps have been taken:

Completion in 2016 of Taourirt, Benguerir, Oujda and Bouskoura stations
Construction underway of Temara stations as well as those accompanying the project of the High Speed ​​Line, namely Tangier, Kenitra, Rabat City, Rabat Agdal and Casa Voyageurs
Launching / continuation of studies relating to the stations of Guercif, Settat, Skhirat, Meknes and Taza
Note that these buildings have all the necessary amenities and are home to shopping centers offering multiple services in addition to activities related to travelers (ticketing, waiting room, coffee, …) and outdoor amenities integrating harmoniously with their urban environment: esplanade, green spaces, taxi station, parking …, they also include equipment and facilities at the cutting edge of technology: video surveillance, fire detection, sound, advertising display, electronic display of train schedules In addition, these stations are equipped with the necessary facilities and conveniences to facilitate the accessibility of persons with reduced mobility and to offer them services adapted to their specific needs: access ramps to the car park and the underpass , car parking spaces, special counter, dedicated toilets, …

Improve the reception and comfort conditions of travelers, particularly through the provision of services that meet quality standards and the integration of commercial and leisure spaces
Facing the growth of passenger traffic
To support the urban development of cities, with the aim of helping to stimulate their economic progress and the large-scale dynamics of the urban fabric that surrounds them
Enhance and optimize the use of railway assets, while preserving the environment and exploiting technologies and processes to reduce GHGs, enhance energy efficiency and be part of the national strategy for sustainable development

Desaturation of the Casa railway junction

More fluidity and cadence
Through the Casablanca railway junction, located between the Casa-Voyageurs train stations, Casa-Port, Aïn Sebaa and the Roches Noires freight station, 90% of the rail traffic (over 200 trains / day) passes. This interchange irrigates virtually the entire national rail network for both passenger and freight activities.

Nevertheless, this junction has reached saturation with operational limits resulting in delays and disruptions in rail traffic. Its desaturation is then imposed through a structuring project realized in phases as presented below.

Phase 1 (Ain Sebaa / Casa-Voyageurs): Reshaping the Ain Sebaa and Casa-Voyageurs stations, removing the Ain Sebaa junction, building two railway bridges and laying a fourth track between Ain Sebaa and Casa-Voyageurs as well as the modernization of railway equipment and signaling facilities
Phase 2 (Casa-Port to Ain Sebaa and Casa-Voyageurs): Removal of the bifurcation, construction of two sheep jumps and the Moulay Slimane rail bridge, installation of two additional lanes between Ain Sebaa / Casa-Port and Casa-Port / Casa-Voyageurs and a 5th dedicated freight route between Casa-Voyageurs and Roches Noires, construction of retaining walls, and modernization of signaling facilities
Other facilities: Construction of the new Casa-Voyageurs maintenance center, the high-speed train storage site and substations at Casa-Voyageurs and Roches Noires, as well as a sectioning station at Ain Sebaa.

Streamline traffic and improve rail supply
Separate passenger and freight flows through dedicated lanes
Increase the capacity of lines and improve the pace and regularity of trains
Strengthen the safety and security of traffic

Key figures

Performance at the service of sustainable mobility. According to the report World Economic Forum “WEF” in its 2017-2018 edition, the Moroccan rail network is ranked leader at the Arab-African level in terms of competitiveness and quality. This is evidenced by the constant evolution over the years of the various technical, economic, commercial and financial indicators.

3600 km

track length

2110 km of length


133 stations


250 locomotives

in circulation

37 rowing


560 Car


5 500 cars

with goods

73 % lines


38 million


210 trains

per day

20 million travelers

aboard mainline trains

17.6 million travelers

on board fast trains

110,523 places

offered / day

140,000 travelers

rush hour

37 rames


560 cars


60 distributors

automatic tickets

74% satisfaction rate


30 million

tons transported

1500 cars

transported / day

80,000 tonnes / day


5,500 wagons

with goods

70 trains / day

in circulation

35 products


185 customers

large accounts

70% of the traffic

from and to the ports

7,586 employees

serving customers

90% of employees

mobilized on the ground

481 effective

recruited collaborators

16% rate


67 592 days old


5,185 families

beneficiaries of summer resorts

1,000 children

beneficiaries of summer camps

6% of the equivalent

payroll for training

Major structural projects were completed in 2018 for the development of the existing rail network. It is more particularly:

The tripling of the Casablanca – Kenitra route over 130 km including the renovation of the Salé-Rabat tunnel as well as the de-saturation of the Casablanca crossroads through which 90% of passenger and goods traffic passes
From the complete doubling of the Casablanca – Marrakech line over 170 km
Strengthening safety and security at the railway rights-of-way
From the construction of new modern railway stations in Tangiers, Kenitra, Rabat, Casablanca, Oujda and Benguerir, from simple transit points to multifunctional life centers and multimodal hubs, offering more services and better accessibility
Investments made: 2010-2017 revealing figures

3,000 companies


180,000 jobs

created during the works

60 million man-days


2.5 billion dhs / year

as a gain for the Community

5.6 billion dhs / year

as intangible capital generated

1,000,000 tonnes equivalent

carbon that will be avoided (for 10 years)

0.41% share ONCF

in global GHG emissions in Morocco

2.48% share ONCF

GHG emissions from the transport sector

-3.5% of emissions

GHG in 1 year

-10% emissions

GHG targets by 2020

2.5 billion Dh

gains for the community through rail

-20% energy consumption

goals by 2020


Train as the Future of Freight

The expectations and desires of economic actors are changing at high speed. To meet these expectations, ONCF has integrated logistics into its key areas of business. The objective is to become Morocco’s biggest logistics operator, a major player able to master the entire value chain.

ONCF Freight has been built around four main principles.

Guaranteeing the transport of merchandise under optimal conditions.
Creating integrated transport solutions and implementing optimized logistics solutions.
Providing connected services for storage, handling and the use of multi-modal terminals.
The handling and transport of merchandise guaranteeing optimal delivery times, secure procedures and the best value-for-money

Positive performance for coal and hydrocarbons.

Spearhead of Moroccan industry, the automobile sector is a major center of growth for ONCF. Vehicle transport between the Renault factory and Tanger Med Port is constantly growing.

Spearhead of Moroccan industry, the automobile sector is a major center of growth for ONCF.

ONCF provides rail connection between the car factories, allowing them to benefit from the clear advantages of rail transport.

The transport of vehicles between the Renault factory and Tanger Med Port is constantly growing. Thanks to the implementation of a boosted service of 6 trains per day in both directions it is now possible to transport 1,500 cars a day.

These transport services between factory and the Tanger Med Port are complemented through the provision of storage services at Casablanca Mita and the transport of 20,000 vehicles between Casablanca and Tanger Med. Building on the success of the experience with Renault, ONCF has already signed a contract with PSA to transport between 100,000 and 200,000 vehicles between Kenitra and Tanger Med.

Recent videos

Contact us


8 Bis, Rue Abderrahmane El Ghafiki, Agdal – Rabat





Email :


A mission at the service of sustainable mobility
Created by Dahir n ° 1- 63 - 225 of 05th August 1963, the National Office of Railways "ONCF" is a Public Institution of Industrial and Commercial Character (EPIC), endowed with the civil personality and the financial autonomy . Its mission is to ensure the rail transport of passengers and goods in the best conditions of safety, safety, comfort, regularity, and sustainable development. As such, he ensures:

the operation of the national rail network
carrying out studies, building and operating new railway lines
the operation of the undertakings directly or indirectly related to the object of the Office.

Its main purpose is the management of railway infrastructure and the operation of passenger rail and freight transport services, for which it acts as the integrator of the supply chain. It also contributes to the activities of urban rail transport and offers complementary services that reinforce its main vocation.

Five values ​​shared daily
The ONCF ensures the transport of people and goods in the best conditions by respecting the standards and safety rules in force and by taking the necessary actions of vigilance, prevention and monitoring.
ONCF constantly improves with the desire to surpass itself, while aspiring to a better future whose watchwords are the performance and the professionalism at the service of its stakeholders.
The ONCF communicates openly, favoring the listening and the respect of the opinion of the other. It establishes a climate of trust and understanding based on consultation and sincerity.
The ONCF ensures compliance with the rules and procedures, while adopting a responsible attitude, professional behavior and persevering in good practices.
ONCF is involved and committed to achieving the objectives set, focusing on teamwork, initiative and putting the satisfaction of stakeholders at the heart of their concerns.