After the Latvian victory over the Bolsheviks in the Latvian War of Independence, the new Republic of Latvia was constituted as a liberal democracy. But the 1934 Latvian coup d'état established an authoritarian regime under Kārlis Ulmanis, which suppressed the country's left-wing opposition. The subsequent Soviet occupation in 1940, Nazi occupation in 1941 and Soviet re-occupation in 1944 ensured the ultimate suppression of any remaining left-wing opposition. The Latvian Soviet Socialist Republic was established under the single-party rule of the Communist Party of Latvia. The country eventually regained its independence during the Singing Revolution, which restored liberal democracy after over 50 years of authoritarian rule.