Haarlem was granted city status or stadsrechten in 1245, although the first city walls were not built until 1270. The modern city encompasses the former municipality of Schoten as well as parts that previously belonged to Bloemendaal and Heemstede. Apart from the city, the municipality of Haarlem also includes the western part of the village of Spaarndam. Newer sections of Spaarndam lie within the neighbouring municipality of Haarlemmerliede en Spaarnwoude.
Topographic map image of Haarlem (city), March 2014
The city is located on the river Spaarne, giving it its nickname 'Spaarnestad' (Spaarne city). It is situated about 20 km (12 mi) west of Amsterdam and near the coastal dunes. Haarlem has been the historical centre of the tulip bulb-growing district for centuries and bears its other nickname 'Bloemenstad' (flower city) for this reason.