The city is located 73 k inland from Jeddah , in the narrow sandy Valley of Abraham , 277 m above sea level . With a population of 1.7 million ( 2008 ) , the city is located 73 k inland from Jeddah in a narrow valley at a height of 277 m above sea level .