The First Battle of El Alamein (1–27 July 1942) was a battle of the Western Desert Campaign of the Second World War, fought in Egypt between Axis forces(Germany and Italy) of the Panzer Army Africa (Panzerarmee Afrika, which included the Afrika Korps) (Field Marshal (Generalfeldmarschall) Erwin Rommel) and Allied (British Imperial and Commonwealth) forces (Britain, British India, Australia, South Africa and New Zealand) of the Eighth Army (General Claude Auchinleck).
The British prevented a second advance by the Axis forces into Egypt. Axis positions near El Alamein, only 66 miles (106 km) from Alexandria, were dangerously close to the ports and cities of Egypt, the base facilities of the Commonwealth forces and the Suez Canal. However, the Axis forces were too far from their base at Tripoli in Libya to remain at El Alamein indefinitely, which led both sides to accumulate supplies for more offensives, against the constraints of time and distance.
The Second Battle of El Alamein (23 October–11 November 1942) was a battle of the Second World War that took place near the Egyptian railway halt of El Alamein. With the Allies victorious, it was the watershed of the Western Desert Campaign. The First Battle of El Alamein had prevented the Axis from advancing further into Egypt. In August 1942, Lieutenant-General Sir Bernard Law Montgomery took command of the Eighth Army following the sacking of General Claude Auchinleck and the death of his replacement Lieutenant-General William Gott in a plane crash.
The British victory turned the tide in the North African Campaign and ended the Axis threat to Egypt, the Suez Canal and the Middle Eastern and Persian oil fields via North Africa. The Second Battle of El Alamein revived the morale of the Allies, being the first major success against the Axis since Operation Crusader in late 1941. The battle coincided with the Allied invasion of French North Africa in Operation Torch, which started on 8 November, as well as the Battle of Stalingrad and the Guadalcanal Campaign.