Saudi Arabia has entered into an $8.22bn deal with a Spanish consortium for the second phase of a high-speed rail project linking Mecca and Medina with the port city of Jeddah.

The current contract for the Haramain high speed rail project (HHR) involves track laying, electrification, operations and maintenance. The Al-Shoula consortium includes Renfe, Obrascon Huarte Lain, Talgo, Adif and eight other companies.

Under the deal, the consortium will build the rail line and maintain it for 12 years.

The agreement also involves the delivery of 35 high-speed trains with 13 carriages each, traffic signs and railway tracks, with a possible future purchase of an additional 23 trains.

The Haramain project is aimed at transporting pilgrims between Jeddah and the two holy cities of Medina and Mecca, covering about 450km. The annual Hajj pilgrimage to Mecca attracts about 2.5 million Muslims worldwide.

The new rail link will have trains running at 320km an hour and is projected to handle 166,000 passengers a day, with the travel time between Mecca to Medina expected to be two and a half hours.

The rail project is being executed in two phases. The $1.8bn contract for the first phase was awarded in March 2009 to the Al Rajhi Alliance. The Alliance is a consortium of Chinese and Saudi companies, China Railway Engineering and Alstom Transport.

The first phase of the project entails civil works including construction of bridges, viaducts, retaining walls, subways, shafts, tunnels and embankments.

This phase also involves construction of the five passenger stations, including Mecca Central in Mecca, Jeddah Central and Jeddah Airport in Jeddah, King Abdullah Economic City in Rabig and Knowledge Economic City in Madinah.

Saudi Railway Organization plans to carry out pilot operations on the track for a duration of six months before opening the line completely to passengers by the end of 2012.