Tallinn received Lübeck city rights in 1248, however the earliest evidence of human settlement in the area dates back nearly 5,000 years. The first recorded claim over the place 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. Tallinn was known as one of the most important medieval ports in the Gulf of Finland together with Turku; due to its strategic location in the Baltic Sea, the city became a significant 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.