AlUla now became the major settlement of the region again until modern times. Between 1901 and 1908 the Ottomans built the Hejaz railway in order to link Damascus to Madinah. The railway had main stations in both Mada'in Salih (Hegra) and AlUla, where a line was built through the western part of Al-Khuraybah, some 12 km (7.5 mi) to the north of the old medieval town, which is believed to be the site of the old Dedanite and Lihyanite town that is still standing there despite being in bad shape.[citation needed]