changes, the Baltic Germans in Riga had maintained a dominant position. By 1867, Riga's population was 42.9% German. Riga employed German as its official language of administration until the installation of Russian in 1891 as the official language in the Baltic provinces, as part of the policy of Russification of the non-Russian-speaking territories of the Russian Empire, including Congress Poland, Finland and the Baltics, undertaken by Tsar Alexander III. More and more Latvians started moving to the city during the mid-19th century. The rise of a Latvian bourgeoisie made Riga a centre of the Latvian National Awakening with the founding of the Riga Latvian Association in 1868 and the organisation of the first national song festival in 1873. The nationalist movement of the Neo-Latvians was followed by the socialist New Current during the city's rapid industrialisation, culminating in the 1905 Revolution led by the Latvian Social Democratic Workers' Party. World War I The 20th century brought World War I and the impact of the Russian Revolution of 1917 to Riga. As a result of the battle of Jugla, the German army marched into Riga on 3 September 1917. On 3 March 1918, the Treaty of Brest-Litovsk was signed, giving the Baltic countries to Germany. Because of the armistice with Germany of 11 November 1918, Germany had to renounce that treaty, as did Russia, leaving Latvia and the other Baltic States in a position to claim independence. Latvia, with Riga as its capital city, thus declared its independence on 18 November 1918. Between World War I and World War II (1918–1940), Riga and Latvia shifted their focus from Russia to the countries of Western Europe. The United Kingdom and Germany replaced Russia as Latvia's major trade partners. The majority of the Baltic Germans were resettled in late 1939, prior to the occupation of Estonia and Latvia by the Soviet Union in June 1940. World War II During World War II, Latvia was occupied by the Soviet Union in June 1940 and then was occupied by Nazi Germany in 1941–1944. On 17 June 1940, the Soviet forces invaded Latvia occupying bridges, post/telephone, telegraph, and broadcasting offices. Three days later, Latvian president Karlis Ulmanis was forced to approve a pro-Soviet government which had taken office. On 14–15 July, rigged elections were held in Latvia and the other Baltic states, The ballots held the following instructions: "Only the list of the Latvian Working People's