Hamelin (ˈhæməlᵻn ; Hameln ˈhaːml̩n) is a town on the river Weser in Lower Saxony, Germany. It is the capital of the district of Hamelin-Pyrmont and has a population of roughly 57,000. Hamelin is best known for the tale of the Pied Piper of Hamelin.
Hamelin started with a monastery, which was founded as early as 851 AD. A village grew in the neighbourhood and had become a town by the 12th century. The incident involving the "Pied Piper" (see below) is said to have occurred in 1284 and may be based on a true event, although somewhat different from the traditional tale. In the 15th and 16th centuries, Hamelin was a minor member of the Hanseatic League.
In June 1634, during the Thirty Years' War, Lothar Dietrich, Freiherr of Bönninghausen, a general in the Imperial Army, lost the Battle of Oldendorf to the Swedish General Kniphausen, after Hamelin had been besieged by the Swedish army.
The era of the town's greatest prosperity began in 1664, when Hamelin became a fort