During the seventh and eighth centuries, the Swedes were merchant seamen well known for their far-reaching trade. In the ninth century, Nordic Vikings raided and ravaged the European Continent as far as the Black and Caspian Seas. During the 11th and 12th centuries, Sweden gradually became a unified Christian kingdom that later included Finland. Queen Margaret of Denmark united all the Nordic lands in the "Kalmar Union" in 1397. Continual tension within the countries and within the union gradually led to open conflict between the Swedes and the Danes in the 15th century. The union's final disintegration in the early 16th century brought on a long-lived rivalry between Norway and Denmark on one side and Sweden and Finland on the other
In the 16th century, Gustav Vasa fought for an independent Sweden crushing an attempt to restore the Kalmar Union and laying the foundation for modern Sweden. At the same time, he broke with the Catholic Church and established the Reformation. During the 17th century, after winning wars against Denmark, Russia, and Poland, Sweden-Finland (with scarcely more than 1 million inhabitants) emerged as a great power. Its contributions during the Thirty Years War under Gustav II Adolf (Gustavus Adolphus) determined the political as well as the religious balance of power in Europe. By 1658, Sweden ruled several provinces of Denmark as well as what is now Finland, Ingermanland (in which St. Petersburg is located), Estonia, Latvia, and important coastal towns and other areas of northern Germany.
Russia, Saxony-Poland, and Denmark-Norway pooled their power in 1700 and attacked the Swedish-Finnish empire. Although the young Swedish King Karl XII (also known as Charles XII) won spectacular victories in the early years of the Great Northern War, his plan to attack Moscow and force Russia into peace proved too ambitious; he fell in battle in 1718. In the subsequent peace treaties, the allied powers, joined by Prussia and England-Hanover, ended Sweden's reign as a great power.
Sweden suffered further territorial losses during the Napoleonic wars and was forced to cede Finland to Russia in 1809. The following year, the Riksdag elected the Swedish King's adopted heir, French Marshal Bernadotte, as Crown Prince Karl Johan. In 1813, his forces joined the allies against Napoleon. The Congress of Vienna compensated Sweden for its lost German territory through a merger of the Swedish and Norwegian crowns in a dual monarchy, which lasted until 1905, when it was peacefully dissolved at Norway's request. During this period Sweden developed a tradition of non-alignment in peacetime and neutrality in war. This policy has allowed Sweden to avoid warfare for nearly 200 years.
Sweden's predominantly agricultural economy shifted gradually from village to private farm-based agriculture during the Industrial Revolution, but this change failed to bring economic and social improvements proportionate with the rate of population growth. About 1.5 million Swedes immigrated to the United States between 1850 and 1930.
The 19th century was marked by the emergence of a liberal opposition press, the abolition of guild monopolies in trade for manufacturing in favor of free enterprise, the introduction of taxation and voting reforms, the installation of a national military service, and the rise in the electorate of three major party groups--Social Democratic, Liberal, and Conservative.
During and after World War I, in which Sweden remained neutral, the country benefited from the worldwide demand for Swedish steel, ball bearings, wood pulp, and matches. Postwar prosperity provided the foundations for the social welfare policies characteristic of modern Sweden. Foreign policy concerns in the 1930s centered on Soviet and German expansionism, which stimulated abortive efforts at Nordic defense cooperation. Sweden followed a policy of armed neutrality during World War II and currently remains nonaligned. Sweden became a member of the European Union in 1995.