Prior to the Second Battle of Gaza, the town had been developed into a strong modern fortress, with entrenchments, wire entanglements and a glacis on its south and south–eastern edges. A series of field works, mutually supported by artillery, machine guns and rifles, extended from Gaza eastwards to within of Beersheba. Beginning on 27 October, the EEF began a heavy and almost continuous bombardment of Gaza. During this time, the EEF's XXI Corps, holding the Gaza section of the line, had been mostly passive until the night of 1/2 November, when a series of determined night-time assaults were mounted against the Gaza defences. Yet these attacks were only partially successful due to the strength of the garrison. The bombardment of Gaza intensified on 6 November and during the night of 6/7 November successful attacks were launched on several trench systems. On the morning of 7 November, Gaza was found to have been evacuated during the night. The Gaza to Beersheba line subsequently collapsed and the Ottoman Seventh and Eighth Armies were forced into retreat. Following several battles during the pursuit, the EEF captured Jerusalem on 9 December 1917.