During Latvian War of Independence Latvian army followed Germans in their advance towards Riga. On 22 May 1919 Germans captured Riga and thus Latvian Socialist Soviet Republic suffered a major defeat. But Latvian Riflemen on their way toward Riga met fellow Latvians in the battlefield of Kaugurciems. Red Latvian rifleman were defeated in the battle and retreated from Vidzeme into Latgalia.