Tallinn is the capital and largest city of Estonia. It is situated on the northern coast of the country, on the shore of the Gulf of Finland in Harju County. From the 13th century until 1918 (and briefly during the Nazi occupation of Estonia from 1941 to 1944), in languages other than Estonian the city was known as Reval. Tallinn, first mentioned in 1219, received city rights in 1248, but the earliest human settlements date back 5,000 years. The initial claim over the land was laid by the Danes in 1219, after a successful raid of Lyndanisse led by Valdemar II of Denmark, followed by a period of alternating Scandinavian and German rule. 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.