Tallinn is the capital, the most populous and the primate city of Estonia. Located in the northern part of the country, on the shore of the Gulf of Finland of the Baltic Sea, it had a population of 437,619 as of 2020. Administratively a part of Harju County, Tallinn is the main financial, industrial and cultural centre of Estonia; the second largest city, Tartu, is located in the southern part of Estonia, 187 kilometres southeast of Tallinn. Tallinn is located 80 kilometres south of Helsinki, Finland, 320 kilometres west of Saint Petersburg, Russia, 300 kilometres north of Riga, Latvia, and 380 kilometres east of Stockholm, Sweden. From the 13th century until the first half of the 20th century Tallinn was known in most of the world by variants of its other historical name Reval.
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.