active, including an increase in the percentage of urban dwellers in Stockholm – a pattern comparable to increasing urban populations in other European capital and port cities – as well as the foundation of a number of small new towns. The second period of urban growth began around 1750 in response to shifts in Swedish trade patterns from the Baltic to the North Atlantic. It was characterised by increasing populations in the small towns of the north and west. 19th century Gustavian era Loss of Finland: 1809 Finland was lost to Russia in a war that lasted from February 1808 to September 1809. As a result of the peace agreement, Finland became a Grand Duchy and thus was officially ruled by the Tsar of Russia though it was not strictly part of Russia. Humanitarian aid from England did not succeed in preventing Sweden from adopting more Napoleon-friendly policies after the Swedish coup d'état in 1809. Union with Norway: 1814 In 1810, French Marshal Jean-Baptiste Bernadotte, one of Napoleon's top generals, was elected as Charles XIV John of Sweden (1818–44) by the Riksdag. He had a Jacobin background and was well-grounded in revolutionary principles, but put Sweden in the coalition that opposed Napoleon. In 1813, his forces joined the allies against Napoleon and defeated the Danes at Bornhöved. In the Treaty of Kiel, Denmark ceded mainland Norway to the Swedish king. Norway, however, declared its independence, adopted a constitution and chose a new king. Sweden invaded Norway to enforce the terms of the Kiel treaty in the last war Sweden has fought. After brief fighting, the peace established a personal union between the two states. Even though they shared the same king, Norway was largely independent of Sweden, except Sweden controlled foreign affairs. The king's rule was not well received and when Sweden refused to allow Norway to have its own diplomats, Norway rejected the King of Sweden in 1905 and selected its own king. During Charles XIV's reign, the first stage of the Industrial Revolution reached Sweden. This first take-off was founded on rural forges, textile proto-industries and sawmills. The popularity of Charles XIV decreased for a time in the 1830s, culminating in the Rabulist riots in 1838 after the Lèse-majesté conviction of the journalist Magnus Jacob Crusenstolpe, and some calls for his abdication. The 19th century was marked by the emergence of a liberal opposition press, the abolition of