In mid-1942, the Axis forces defeated the Commonwealth force in Libya and advanced into north-west Egypt. In June the British Eighth Army made a stand just over west of Alexandria, at the railway siding of El Alamein and the 9th Division was brought forward to reinforce this position. The lead elements of the division arrived at El Alamein on 6 July and it was assigned the most northerly section of the Commonwealth defensive line. From that position, the 9th Division subsequently played a significant role in the First Battle of El Alamein, helping to halt the Axis advance. Casualties were heavy, and the &lt;a href="2/28th%20Battalion%20%28Australia%29"&gt;2/28th Battalion&lt;/a&gt; was forced to surrender on 27 July when it was surrounded by German armour after capturing Ruin Ridge. Following this battle the division remained at the northern end of the El Alamein line and launched diversionary attacks during the Battle of Alam el Halfa in early September.