On November 18, 1918 the People's Council of Latvia proclaimed the Independence of the Republic of Latvia and created the Latvian Provisional Government headed by Kārlis Ulmanis.On December 1, 1918 the newly proclaimed republic was invaded by Soviet Russia.Much of the invadinig army in Latvia consisted of Red Latvian Riflemen, which made the invasion easier. The Soviet offensive met little resistance. In the north Alūksne was taken on December 7, Valka on December 18, and Cēsis on December 23, in the south Daugavpils was taken on December 9 and Pļaviņas on December 17. Riga was captured by the Red Army on January 3, 1919. By the end of January the Latvian Provisional Government and remaining German units had retreated all the way to Liepāja, but then the Red offensive stalled along the Venta river. The Latvian Socialist Soviet Republic was officially proclaimed on January 13 with the political, economic, and military backing of the Soviet Russia.
Question: What happened first: creation of the Latvian Provisional Government or capture of Riga?
Answer: creation of the Latvian Provisional Government