The invading forces made a determined and speedy attack on East Prussia. However, the First and Second Armies were stopped by the German Eighth Army, led by Field Marshal Paul von Hindenburg and his chief of staff, General Erich Ludendorff. The German and Russian armies met at Tannenberg, where the Second Army was encircled and suffered complete destruction. Both the First and Second Armies suffered terrible casualties in one of the most comprehensive German victories of World War I. The First Army also suffered defeat at the First Battle of the Masurian Lakes in September 1914, which led to Rennenkampf's dismissal and replacement by Litvinov. First Army served under Northwestern front for the remainder of the war. Litvinov was replaced by Sokovnin in April 1917. Vannovski replaced Sokovnin in July and the army's final commander, von Notbek, took over in September 1917.