Finland's traces of human settlement date back to the thaw of the last Ice Age some 10,000 years ago. The Finns' ancestors seem to have dominated half of northern Russia before arriving on the north of the Baltic coast well before the Christian era. By the end of the Viking Age, Swedish traders and chieftains had extended their interests throughout the Baltic region. Over the centuries, Finland has sat precariously between the Protestant Swedish empire and Eastern Orthodox Russia. For seven centuries, from the 12th century until 1809, it was part of Sweden.
Finland was blighted by constant battles with Russia and severe famines. From 1696-97, famine killed a third of all Finns. The 1700s were punctuated by bitter wars against Russia, culminating in the eventual loss of Finland to Russia in 1809. With nationalism beginning to surge during the latter half of the 19th century, Finland gained greater autonomy as a Grand Duchy, though new oppression and Russification followed, making Finns emotionally ripe for independence.
The downfall of the tsar of Russia and the Communist revolution in 1917 made it possible for the Finnish senate to declare independence on 6 December 1917. Demoralising internal violence flared up, with Russian-supported 'Reds' clashing with nationalist 'Whites' who took the German state as their model. During 108 days of a bloody civil war, approximately 30,000 Finns were killed by their fellow citizens. Although the Whites were victorious, Germany's weakened position after WWI discredited it as a political model and relations with the Soviet Union were soon normalised. Political salves did little to heal the wounds of civil war, however, and stories of 'peacetime' massacres are still emerging from these dark days of Finnish history.
Diplomatic manoeuvrings in Europe in the 1930s meant that Finland had a few difficult choices to make. The security threat posed by the Soviet Union meant that some factions were in favour of developing closer ties with Nazi Germany, while others favoured rapprochement with Moscow. On 23 August 1939, the Soviet and German foreign ministers, Molotov and Ribbentrop, stunned the world by signing a nonaggression pact. A secret protocol stated that they would divide Poland between them in any future rearrangement; Germany would have a free hand in Lithuania, the Soviet Union in Finland, Estonia, Latvia and Bessarabia. The Red Army was moving towards the earmarked territories less than three weeks later.
The Soviet Union made more territorial claims, arguing its security required a slice of southeastern Karelia. JK Paasikivi (later to become president) visited Moscow for negotiations on the ceding of the Karelian Isthmus to the Soviet Union. The negotiations failed. On 30 November 1939, the Winter War between Finland and the Soviet Union began. After 100 days of bitter and courageous fighting Finnish forces were defeated.
Isolated from Western allies during WWII, Finland turned to Germany for help and allowed the transit of German troops. When hostilities broke out between Germany and the Soviets in June 1941, German troops were already on Finnish soil, and the Continuation War between Finland and the Red Army began. In the fighting that followed, the Finns began to resettle Karelia. When Soviet forces staged a huge comeback in the summer of 1944, President Risto Ryti resigned and Mannerheim took his place. Mannerheim negotiated an armistice with the Russians and ordered the evacuation of German troops. Finland waged a bitter war to oust the Germans from Lapland until the general peace in the spring of 1945.
Following WWII, a weakened (but independent) Finland took a new line in its Soviet relations, ceding the Karelian Isthmus and agreeing to recognise Soviet security concerns in defending its frontiers. The 25 years of Urho Kekkonen's presidency (1956-81) were a clever balancing act: Kekkonen kept a tight grip on domestic power, and managed to strengthen ties with Scandinavian siblings without alienating the big huggy bear to the east.
The collapse of the Soviet Union came at a difficult time for Finland. Its right foot - bogged in the free market - had to endure the late-1980s slump, and its left foot - tied up by Soviet borrowings - encountered the dissolution of its debtor. Due to Finland's generous social security payments, sudden rises in unemployment put intolerable pressure on government finances.
In the 1990s Finland's overheated economy went through a cooling off period marked by the floating of the Finn markka. Finland voted to join the European Union in late 1994 and became a full member in 1995. In the 1995 elections a Social Democrat-dominated coalition ousted the right-wing coalition. A UN survey in 1998 rated Finland fifth in the world in terms of quality of life.
Since joining the EU, Finland has received considerable assistance from Brussels, and was one of the member countries to fully adopt the euro in 2001. In February 2000, Finns elected their first ever female president - left-leaning Tarja Halonen, who remains in the position after being re-elected in 2006.