On 22 June 1941, German troops attacked Soviet forces in Operation Barbarossa. There were some spontaneous uprisings by Latvians against the Red Army which helped the Germans. By 29 June Riga was reached and with Soviet troops killed, captured or retreating, Latvia was left under the control of German forces by early July. The occupation was followed immediately by SS Einsatzgruppen troops, who were to act in accordance with the Nazi Generalplan Ost that required the population of Latvia to be cut by 50 percent.