Tallinn, first mentioned in 1154, received city rights in 1248, but the earliest human settlements date back 5,000 years. The first recorded claim over the land was laid by Denmark in 1219, after a successful raid of Lyndanisse led by King Valdemar II, followed by a period of alternating Scandinavian and Teutonic rulers. Due to its strategic location, the city became a major trade hub, especially from the 14th to the 16th century, when it grew in importance as part of the Hanseatic League. Tallinn's Old Town in Kesklinn is one of the best preserved medieval cities in Europe and is listed as a UNESCO World Heritage Site.