The city 's demographics changed dramatically after the Ottoman government 's decision to construct the Hejaz Railway and facilitated the annual Hajj pilgrimage and trade .
The Hejaz Railway linked Damascus and Medina .
The city 's demographics changed dramatically after the Ottoman government 's decision to construct the Hejaz Railway , which linked Damascus and Medina , and facilitated the annual Hajj pilgrimage and trade .