One train reached 275 kph (170 mph) on Monday along a stretch of track between the northern cities of Kenitra and Tangiers, the ONCF said.
“This is already the fastest train on the African continent,” said French Foreign Minister Jean-Yves Le Drian, who was in Morocco to sign a loan deal between the ONCF and the French Development Agency.
He said the railway was “emblematic of the Franco-Moroccan bilateral relationship”.
The link between Casablanca and Tangiers via the capital Rabat will slash journey times between the North African country’s economic hubs by almost two thirds, to just over two hours.
Morocco’s TGV, which gets its name from the French abbreviation for high-speed trains, is set to enter service in summer 2018.
The total cost of the project, 50 percent financed by France through various loans, is around $2.4 billion (2 billion euros).
It is set to go around 15 percent over budget, according to figures released on Monday.
But ONCF head Rabii Lakhlii said the project had cost “less than 9 million euros per kilometre, compared to a European standard of 20 million euros per kilometre”.
The route, made more complex by hilly terrain and strong winds, required the building of several viaducts including one some 3.5 kilometres long.
The ONCF is targeting six million travellers a year after three years of operations.
Lakhlii said tickets would cost about 30 percent more than those for the current rail link.
Moroccan leaders have heralded the project as a key step in modernising the country’s infrastructure.
But opponents have criticised it, saying the money could have been better spent in a country where many live in poverty.
They also argue that it unfairly favoured French companies.
Download our app and read this and other great stories on the move. Available for Android and iOS.