The British prepared a new defensive position at Mersa Matruh. 21st Panzer was used to sweep behind the British XIII Corps, where it engaged in an intense combat with the 2nd New Zealand Division at the Battle of Mersa Matruh. The British were defeated and fell back to a new line at El Alamein. In a series of battles fought in July 1942, the Eighth Army was able to stop the advance of the Afrika Korps at the First Battle of El Alamein. Shortages in equipment, ammunition and fuel limited further actions. Rommel made a last effort to break through the British positions on 31 August 1942 at the Battle of Alam el Halfa, but the Germans were again repulsed. In a series of battles in this area the 21st Panzer Division commander Von Bismarck was killed by a British mine and "Oberst" C. H. Lungerhausen took command until Major General Heinz von Randow arrived on 18 September.