Five years later he was made commander of the Fourth Army Corps based in Magdeburg as a General of the Infantry (lieutenant-general; the German equivalent to four-star rank was Colonel-General). The annual maneuvers taught him how to maneuver a large force; in 1908 he defeated a corps commanded by the Kaiser. Schlieffen recommended him as Chief of the General Staff in 1909, but he lost out to Helmuth von Moltke. He retired in 1911 "to make way for younger men". He had been in the army for 46 years, including 14 years in General Staff positions. When WWI broke out, Hindenburg was retired in Hanover. On 22 August, he was selected by the War Cabinet and the German high command ("Oberste Heeresleitung", OHL) to assume command of the German Eighth Army in East Prussia, with General Erich Ludendorff as his chief of staff. After the Eighth Army had been defeated by the Russian 1st Army at Gumbinnen, it had found itself in danger of encirclement as the Russian 2nd Army under General Alexander Samsonov advanced from the south towards the Vistula River. Momentarily panicked, Eighth Army commander Maximilian von Prittwitz notified OHL of his intent to withdraw his forces into Western Prussia. The Chief of the German General Staff, "Generaloberst" Helmuth von Moltke, responded by relieving Prittwitz and replacing him with Hindenburg. Upon arriving at Marienberg in 23 August, Hindenburg and Ludendorff were met by members of the 8th Army's staff led by Lieutenant Colonel Max Hoffmann, an expert on the Russian army. Hoffman informed them of his plans to shift part of the 8th Army south to attack the exposed left flank of the advancing Russian Second Army. Agreeing with Hoffman's strategy, Hindenburg authorized Ludendorff to transfer most of the 8th Army south while leaving only two cavalry brigades to face the Russian First Army in the north. In Hindenburg's words the line of soldiers defending Germany's border against was "thin, but not weak", because the men were defending their homes. If pushed too hard by the Second Army, he believed they would cede ground only gradually as German reinforcements continued to mass on the invading Russians' flanks before ultimately encircling and annihilating them. On the eve of the ensuing battle, Hindenburg reportedly strolled close to the decaying walls of the fortress of the Knights of Prussia, recalling how the Knights of Prussia were defeated by the Slavs in 1410 at nearby Tannenberg.