The Russian invasion of East Prussia took Germany by surprise. The Russians had secretly begun to mobilize ahead of the tsar’s proclamation of war on 30 July, so both the speed and the scale of their attack panicked the German commander, von Prittwitz, who requested permission to retreat behind the River Vistula, abandoning East Prussia. Aghast at this defeatism, the German High Command promptly replaced Prittwitz with Field Marshal von Hindenburg on 24 August 1914. Hindenburg rallied the 8th Army and conceived a plan for a counteroffensive. The Germans, who had been eavesdropping on the Russians’ unencrypted radio communications, acted to split the two Russian armies, effectively screening the 1st Army under General Rennenkampf while preparing a decisive strike upon the 2nd Army under General Samsonov. The place chosen for the engagement by Hindenburg was Allenstein, near Tannenberg, the site of a historic defeat of the Germans by the Slavs.
— OR —