The 450km Haramain High-Speed railway, which cost $16bn, will link Mecca and Medina via the Red Sea city of Jeddah.

Saudi Arabia has launched a high-speed railway connecting Islam’s two holiest cities in a bid to improve traffic congestion for the millions of Muslim pilgrims that visit the country annually.

King Salman launched the 450km Haramain High-Speed Rail System linking Mecca and Medina via the Red Sea city of Jeddah on Tuesday.

The railway system, which has 35 trains capable of travelling at speeds of 300km per hour, will also transport regular travellers cutting the commute time between the holy cities from more than five hours to two hours.

“The journey between the Haramain (two holy mosques) is now shorter and easier than at any time before,” Transport Minister Nabil al-Amoudi told dignitaries gathered at the Jeddah station.

“The project highlights the kingdom’s commitment to serving Islam and Muslims.” he added.

The railway will cut the commute time between the holy cities from more than five hours to two hours [Stephen Kalin/Reuters]

The rail project, described by local officials as the biggest transportation project in the region and dogged by several delays, was built at a cost of more than $16bn, according to Saudi media.

The transport network will have five stations: Mecca, Jeddah, King Abdullah Economic City, King Abdulaziz International Airport and Medina. The railway is due to begin operating commercially next Monday.

Officials said there will eight services a day until the end of this year, when services will be increased to 12.

In 2011, Saudi Arabia signed a deal for a Spanish consortium to build the rail track, supply 35 high-speed trains and handle a 12-year maintenance contract.

The kingdom is boosting its infrastructure spending and expanding its railways, including with a $22.5bn metro system under construction in the capital Riyadh, as it seeks to diversify its oil-dependent economy.

The annual hajj pilgrimage, which is to be held in September next year, attracts more than two million Muslims to the Mecca region.