After previously commanding the Cavalry Corps and the Third Army on the Western Front in France. General Edmund Allenby assumed command of the Egyptian Expeditionary Force on 28 June 1917. At the time the situation in the Middle Eastern theatre of World War I was not promising. The British forces had withdrawn in defeat from Gallipoli and in the campaign in Mesopotamia had been surrounded and forced to surrender after the siege of Kut. In the Sinai campaign, the Turks had demonstrated their willingness to take the battle to the British, with their attack on the Suez Canal. Then after some initial British success at Romani, Maghaba and Rafa, they had just suffered two comprehensive defeats in the first and second battle of Gaza. Following which they had remained on the defensive.