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. The First Battle of El Alamein and the Battle of Alam el Halfa had prevented the Axis from advancing further into Egypt. In August 1942, British General Claude Auchinleck had been relieved as Commander-in-Chief of Middle East Command and his successor, Lieutenant-General William Gott was killed on his way to replace him as commander of the Eighth Army. Lieutenant-General Bernard Montgomery was appointed and led the Eighth Army offensive. The British victory at El Alamein was the beginning of the end of the Western Desert Campaign, eliminating the Axis threat to Egypt, the Suez Canal and the Middle Eastern and Persian oil fields. The battle revived the morale of the Allies, being the first big success against the Axis since Operation Crusader in late 1941. The end of the battle coincided with the Allied invasion of French North Africa in Operation Torch on 8 November, which opened a second front in North Africa. Background Panzer Army Africa (/, Generalfeldmarschall Erwin Rommel), composed of German and Italian tank and infantry units, had advanced into Egypt after its success at the Battle of Gazala (26 May – 21 June 1942). The Axis advance threatened British control of the Suez Canal, the Middle East and its oil resources. General Claude Auchinleck withdrew the Eighth Army to within of Alexandria where the Qattara Depression was south of El Alamein on the coast. The depression was impassable and meant that any attack had to be frontal; Axis attacks in the First Battle of El Alamein (1–27 July) had been defeated. Eighth Army counter-attacks in July also failed, as the Axis forces dug in and regrouped. Auchinleck called off the attacks at the end of July to rebuild the army. In early August, the Prime Minister, Winston Churchill and General Sir Alan Brooke, the Chief of the Imperial General Staff (CIGS), visited Cairo and replaced Auchinleck as Commander-in-chief Middle East Command with General Harold Alexander. Lieutenant-General William Gott was made commander of the Eighth Army but was killed when his transport aircraft was shot down by Luftwaffe fighters; Lieutenant-General Bernard Montgomery was flown from Britain to replace him. Lacking reinforcements and depending on small, underdeveloped ports for supplies and aware of a huge Allied reinforcement