Unlike many other European cities, we know bafflingly little of Tallinn's early history. In 1154 what is now Tallinn was first marked on a map by an Arab cartographer, however the first reliable account of Tallinn's history comes from The Chronicle of Latvian Henrik, wherein Henrik describes the landing of the Danish fleet, led by King Valdemar II, in June of 1219. The Danes quickly snapped up Tallinn as their own and built a large fortress on Toompea Hill. The name 'Tallinn' is actually derived from the Estonian words 'taani linnus,' meaning 'Danish castle.'
Temporarily gaining power from the Danes, the enigmatic Order of the Brotherhood of the Swords governed Tallinn from 1227 to 1238. Around 1230, German merchants from Gotland were invited to Tallinn by the Brotherhood, and their arrival is today considered an important addition to Tallinn's population, which was predominantly German for centuries. In 1248, Tallinn became a member of the Hanseatic League, a mercantile and military alliance of German-dominated cities in Northern Europe. In the middle of the 14th century, due to a lack of cashflow, the King of Denmark decided to sell his piddly holdings in northern Estonia to the German Roman Catholic Order, the Teutonic Knights.
Medieval Tallinn was one of the best-fortified cities in Europe. The town wall was contructed in the 14th century with 66 defense towers adorning it (today only 20 remain). The major boom in town construction (resulting in most of the fine medieval facades that visitors will still see there today) hit Tallinn in the 15th century; however most of the significant places of worship were built in the 13th century, including Niguliste Church (1230), Oleviste Church (first mentioned in 1267) and St. Catherine's convent (begun in the 1240s).
Tallinn benefited from its strategic position as a major crossroads for trade between Western and Northern Europe and Russia. At this time most merchants and profitmakers were Germans, though at least half of its population of 8000 were native Estonians. By the end of the Middle Ages, residency for native Estonians had become very difficult due largely to a high residency fee and many Estonians were forced out of the centre. This German influence over the city became even stronger with the beginning of the Protestant Reformation in the mid-1500s. [Not until the mid-19th century did ethnic Estonians replace Baltic Germans as the majority amongst Tallinn residents.]
Estonia soon became a major battleground as Russia, Sweden, Poland and Denmark all duked it out for superiority in the Baltic Sea during the Linovian War (1558 - 1583). Fearing Russian troops, Tallinn surrendered to the seemingly more amiable Swedish crown in 1561, and remained under Swedish rule for the next 150 years, despite two Russian seiges.
In the 15th century, a plague epidemic decimated the town and the Great Fire of 1684 destroyed almost every building on Toompea - only Dome Church and a nearby small stone house were spared any damage. This led to a new period of building in the Old Town, since which very little of the atmosphere, aesthetic and character have changed. During this time a new 159m high Gothic spire was affixed to St. Olav's Church, making it the tallest building in the world during those high-flying years of 1549 to 1625. [Today, after several fires and a lack of that same 'reach-for-the-sky' attitude, St. Olav's stoops a lowly 123m tall overall. Pitiful.]
During the Great Northern War, the Swedes indulged Imperial Russia, wrapping Tallinn with a bow and presenting it to the tsar in 1710; Tallinn's German rulers, however, remained culturally and economically autonomous. The 19th century brought industrialization to Tallinn and the port continued to play an important role, but the pressures of Russification were mounting by the end of the century.
On February 24, 1918, the Independence Manifesto was proclaimed in Tallinn, with the unforeseen side effects of immediate German occupation and a war with Russia (Oops). On February 2, 1920, a peace treaty with Russia was signed, whereby Russia acknowledged their momentary boredom with the whole pursuit and patted the back of the new Estonian Republic. Tallinn became the capital of independent Estonia (Huzzah!). However, with the outbreak of World War Two, a coup overseen by the Red Army led to Estonia being annexed by the USSR before the invasion by Nazi Germany in 1941. Despite being bombed extensively by Soviet forces during the final stages of World War Two, Tallinn's medieval Old Town largely retained its charm. After the retreat of the Nazis in 1944, the Soviets moved in to make sure everything was okay and just happened to reoccupy Estonia for the next 47 years. Tallin was then capital of the Estonian SSR. Despite resistance, Estonia was smothered beneath the Iron Curtain until the unprecedented Estonian Singing Revolution united the country, the Soviet Union eventually fell, an independent democratic Estonian state was re-established (August 20, 1991) and Tallinn quickly became a modern European capital. In 1997, UNESCO crowned the Old Town a World Heritage Site, and in 2004 Estonia joined the EU with its Baltic neighbors.
Today Tallinn is the face that Estonia turns toward a surging tourist industry enamored with the narrow, steep cobbled streets of the Old Town and its flair for design and the arts. Old Town Days, a festival celebrating Tallinn's medieval past, takes place in summer and for four days in mid-summer the town hall square is turned into a large medieval market where ancient traditions are brought back to life by musicians, artisans and madcaps alike. Few cities have been so successful in preserving the integrity of their past and today Estonia's economy is stronger than ever, making Tallinn the model for the former Soviet territories. After many different periods of conflict, the thing that threatens Tallinn most today are the adverse commercial effects of a booming market economy.