With the upheavals of the Livonian War during the 16th century, the crusader orders formerly dominating the present-day Baltic states were dissolved and the region became contested by Sweden, Poland and Russia. By 1561, northern Estonia had become a Swedish dominion. The Swedes transformed the castle from a crusaders' fortress into a ceremonial and administrative centre of political power in Estonia, a purpose the castle has served ever since. In 1710, Sweden lost the territory of modern-day Estonia to the Russian Empire. The Russian administration eventually carried out large reconstruction schemes and turned the castle definitively into a palace. A new dominating wing in Baroque and Neoclassical style, designed by Johann Schultz, was added in the eastern part of the castle complex. It housed the administration of the Governorate and the living quarters of the governor. During the czarist era, a public park was also laid out to the south-east of the castle, and an archive building erected nearby. Following the Estonian Declaration of Independence in 1918, a building to house the parliament of the republic was erected at the site of the former convent building of the Teutonic Order. Taking two years to complete, it was finished in 1922, and designed by architects Eugen Habermann and Herbert Johanson. Although its exterior is traditionalist, the interior is Expressionist in style - the world's only Expressionist parliament building. During the subsequent periods of Soviet, German, and a second Soviet occupation (1940–1991) the Riigikogu was disbanded. The castle and the building of the Riigikogu were however used by the Supreme Soviet of the Estonian SSR during the second Soviet occupation.