After Germany's defeat in World War I, the Latvians (Letts) proclaimed an independent state with Karlis Ulmanis (1877-1940) as prime minister, but in early January 1919, Soviet (Bolshevik) force invaded the country and seized its capital, Riga, where a Soviet government was set up. However, German-Latvian troops, with the approval of the Allies, forced the Soviets to withdraw in March 1919. Though the Treaty of Versailles required the Germans to leave the area, they attempted to take over Latvia and occupied Riga, but were expelled finally in November 1919. Under Allied pressure, the Soviets, who had again tried to take over, were evicted from the country completely in January 1920, and concluded an armistice with the Latvians a month later. By the Treaty of Riga on August 11, 1920, the Soviet government recognized Latvia's independence.