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.
The city is located on the river Spaarne, about 20 km (12 mi) west of Amsterdam and near the coastal dunes. It has been the historical centre of the tulip bulb-growing district for centuries and bears the nickname 'Bloemenstad' (flower city), for this reason.
There are several museums in Haarlem. The Teylers Museum lies on the Spaarne river and is the oldest museum of the Netherlands. Its main subjects are art, science and natural history, and it owns a number of works by Michelangelo and Rembrandt. Another museum is the Frans Hals Museum of fine arts, with its main location housing Dutch master paintings, and its exhibition halls on the Grote Markt housing a gallery for modern art called De Hallen. Also on the Grote Markt, in the cellar of the Vleeshal is the Archeologisch Museum Haarlem, while across the square on Saturdays, the Hoofdwacht building is open with exhibitions on Haarlem history.
Other museums are Het Dolhuys (a museum of psychiatry), the Ten Boom Museum (a hiding place for Jews in World War II) and the Historisch Museum Haarlem, across from the Frans Hals Museum.