The Battle of Tannenburg was fought in the opening days of World War I in an area that today is northeastern Poland. This region of low-lying lakes and forests was then part of the German Empire (East Prussia) and contained a heavily German population. In August 1914, Russia prepared to invade German territory as a means to honor treaty obligations to France. It was hoped that forcing Germany to defend itself in the east would slow their advance in the west. The Russians sent two armies. General P.K. Rennenkampf was to advance directly westward into East Prussia and link up with forces under General A.V. Samsonov, who hoped to trap the Germans by moving up from the south. Rennenkampf initially appeared to be on the road to success, winning an early victory at Gumbinnen. However, he lost contact with Samsonov and drew his forces to a halt. Samsonov proceeded with his effort to outflank the Germans. At this juncture, the Germans benefited from a remarkable stroke of good luck. They intercepted an uncoded message from Rennenkampf indicating that the general was not planning an imminent move. With that information in hand, German General Paul von Hindenburg and his chief of staff, Erich Ludendorff, orchestrated a move against the Samsonov's isolated force. In the closing days of August, the Russian soldiers were forced back, experiencing very heavy losses—approximately 30,000 casualties, as compared to 13,000 for the Germans. In addition, the Russians lost huge stores of war matériel and gave up nearly 100,000 soldiers as prisoners. Upon learning of the magnitude of his defeat, Samsonov committed suicide. In September, Rennenkampf was forced out of East Prussia, leaving the German border secure for the time being. The Battle of Tannenburg was both a material and morale setback for Russia. However, the engagement did achieve its intended repositioning of German forces and contributed to slowing the German advance on the Western Front.