The expulsion of Turkish forces from Egypt in late 1916 led to the establishment by the Turks of a line of fortifications guarding entry into central Palestine. The line extended for more than 24 miles from Gaza on the coast to the town of Beersheba. Following two unsuccessful attempts to turn the western flank at Gaza in March and April 1917, a plan was developed to attack and turn the eastern part of the line at Beersheba. The Desert Mounted Corps under the command of Australian General H G Chauvel was given this responsibility. By 30 October Chauvel's forces were in position in the desert east of the town. On 31 October, two divisions of infantry began a diversionary frontal attack on Beersheba whilst Chauvel's horsemen attacked Turkish positions in the hills north-east of  the town. The Turks resisted strongly and it was not until 3 pm that the main position on Tel-el-Saba hill was overcome. Despite the lateness in the day Chauvel ordered a cavalry charge against the heavily defended town  of Beersheba whose wells held the key to success or failure of the battle. The Australian 4th Light Horse Brigade, under Brig-Gen Grant began moving towards the Turkish lines at 4.30 pm with only bayonets either attached to their rifle or in their hands. As the Brigade advanced it was subject to machine-gun and shrapnel fire but the Light Horsemen pressed forward and two Turkish trenches were cleared at the gallop. Some light horsemen dismounted and engaged the Turkish defenders in hand-to-hand fighting, while others galloped ahead into the town where the Turks were overwhelmed by the ferocity of the assault and soon surrendered.