Tallinn (/ˈtɑːlɪn/ or /ˈtælɪn/, Estonian pronunciation: [ˈtɑlʲˑinˑ]; names in other languages) 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, 80 km (50 mi) south of Helsinki, east of Stockholm and west of Saint Petersburg. From the 13th century until 1918 (and briefly during the Nazi occupation of Estonia from 1941 to 1944), the city was known as Reval. Tallinn occupies an area of 159.2 km2 (61.5 sq mi) and has a population of 443,894. Approximately 32% of Estonia's total population lives in Tallinn.
Tallinn was founded in 1248, but the earliest human settlements date back 5,000 years, making it one of the oldest capital cities of Northern Europe. 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.
In 1154, a town called Qlwn or Qalaven (which may be derivations of Kalevan or Kolyvan) was put on the world map of the Almoravid by the Arab cartographer Muhammad al-Idrisi, who described it as "a small town like a large castle" among the towns of 'Astlanda'. It has been suggested that Quwri may have denoted a predecessor of the modern city.The earliest names of Tallinn include Kolyvan (Russian: Колывань), which is known from East Slavic chronicles and which may have come from the Estonian mythical hero Kalev.
Up to the 13th century, the Scandinavians and Henry of Livonia in his chronicle called the town Lindanisa (or Lyndanisse in Danish, Lindanäs in Swedish and Ledenets in Old East Slavic. According to some poetical suggestions, this name was derived from Linda, the mythical wife of Kalev and the mother of Kalevipoeg, who in an Estonian legend carried rocks to her husband's grave, which formed the Toompea hill. It has been also suggested that the archaic Estonian word linda is similar to the Votic word lidna, meaning a castle or town. According to this suggestion, nisa would have the meaning 'niemi' (or 'peninsula'), producing Kesoniemi, the old Finnish name for the city. Another ancient historical name for Tallinn in Finnish is Rääveli. The Icelandic Njal's saga mentions Tallinn and calls it Rafala, which is a variant of the name Raphael.
After the Danish conquest in 1219, the town became known in the German, Swedish and Danish languages as Reval (Latin: Revalia). The name originated from (Latin) Revelia (Estonian) Revala or Rävala, the adjacent ancient name of the surrounding area.
What can arguably be considered to be Tallinn's main attractions are located in the old town of Tallinn (divided into a "lower town" and Toompea hill) which is easily explored on foot. The eastern parts of the city, notably Pirita (with Pirita Convent) and Kadriorg (with Kadriorg Palace) districts, are also popular destinations, and the Estonian Open Air Museum in Rocca al Mare, west of the city, preserves aspects of Estonian rural culture and architecture.
The city operates a system of bus (64 lines), tram (4 lines) and trolley-bus (5 lines) routes to all districts. A flat-fare system is used. The ticket-system is based on prepaid RFID cards available in kiosks and post offices. Starting from January 2013 public transport for citizens registered to live in Tallinn is completely free. That includes buses, trams and trolleybuses, and also the rail services within city limits.