The first battle of El Alamein was a battle of the Western Desert Campaign in Africa. The battle was fought between the Axis forces, led by General Erwin Rommel, and the Allied forces, commanded by Field Marshal Claude Auchinleck. After the defeat at Gazala, the British 8th Army retreated to Egypt, close to El Alamein, on the Mediterranean coast. Auchinleck created strong defensive positions, with bunkers at the end of each line and machine gun nests in the middle. He was waiting for Rommel's imminent attack.