Around 50,000 of the former czar's army troops were stationed in Finland in January 1918. The soldiers were demoralised and war-weary, and the former serfs were thirsty for farmland set free by the revolutions. The majority of the troops returned to Russia by the end of March 1918. In total, 7,000 to 10,000 Red Russian soldiers supported the Finnish Reds, but only around 3,000, in separate, smaller units of 100-1,000 soldiers, could be persuaded to fight in the front line. The revolutions in Russia divided the Soviet army officers politically and their attitude towards the Finnish Civil War varied. Mikhail Svechnikov led Finnish Red troops in western Finland in February and Konstantin Yeremejev Soviet forces on the Karelian Isthmus, while other officers were mistrustful of their revolutionary peers and instead co-operated with General Mannerheim, in disarming Soviet garrisons in Finland. On 30 January 1918, Mannerheim proclaimed to Russian soldiers in Finland that the White Army did not fight against Russia, but that the objective of the White campaign was to beat the Finnish Reds and the Soviet troops supporting them. The number of Soviet soldiers active in the civil war declined markedly once Germany attacked Russia on 18 February 1918. The German-Soviet Treaty of Brest-Litovsk of 3 March restricted the Bolsheviks' support for the Finnish Reds to weapons and supplies. The Soviets remained active on the south-eastern front, mainly in the Battle of Rautu on the Karelian Isthmus between February and April 1918, where they defended the approaches to Petrograd.

Answer this question based on the article: Which happened first, the German attack on Russia or the majority of troops returning home to Russia?
Germany attacked Russia