The $2 billion project was launched in September 2011 by the king and Nicolas Sarkozy, then president of France.
France financed 51 percent of the project, Morocco 28 percent and the remaining 21 percent was provided by Saudi Arabia, Kuwait and the United Arab Emirates.
Macron’s office said the Moroccan line is an international showcase for the French-made high-speed train. Morocco bought 12 such trains from French manufacturer Alstom.
The king named the first line Al Boraq after a mythical winged creature that transported the prophets to the heavens.
Morocco’s railway office expects 6 million passengers on the line in the first three years of operation.
While the Moroccan government and businesses praised the project as a key achievement in developing the country’s infrastructure, the line has sparked controversy for its high cost. Critics say that Morocco should be investing in education and health instead.
The criticism gained strength mid-October when a train derailed, killing seven people and injuring more than 100.