<P> The Panzer Army Africa ( Panzerarmee Afrika ) , composed of German and Italian infantry and mechanised units under Generalfeldmarschall Erwin Rommel , had struck deep into Egypt by 12 July 1942 after its success at the Battle of Gazala . This threatened the British Empire 's control of the Suez Canal and Mandatory Palestine . General Claude Auchinleck withdrew the Eighth Army to within 80 kilometres ( 50 mi ) of Alexandria to a point where the Qattara Depression came to within 64 kilometres ( 40 mi ) of El Alamein on the coast . This gave the defenders a short front to defend and provided secure flanks because tanks could not traverse the Depression . The Axis advance was halted here in early July in the First Battle of El Alamein . </P>
in which country were the two battles of el alamein fought
Egypt