During the Stalemate in Southern Palestine from April to October 1917, Murray consolidated the EEF's position and in June General Edmund Allenby took command and began preparations to take the offensive, employing manoeuvre warfare He reorganised the force into the XX Corps, XXI Corps and Desert Mounted Corps formerly Desert Column. On 31 October two corps captured Beersheba defended by the Turkish III Corps (which had fought at Gallipoli), which weakened their defences stretching almost continually from Gaza to Beersheba. Subsequently the Battle of Tel el Khuweilfe, the Third Battle of Gaza and the Battle of Hareira and Sheria forced the withdrawal from Gaza on the night of 6/7 November at the beginning of the pursuit to Jerusalem. During the subsequent operations, about of formerly Turkish territory, was captured as a result of the EEF victories at the Battle of Mughar Ridge, fought between 10 and 14 November, and the Battle of Jerusalem fought between 17 November and 30 December.