The Turks had established a strong 50 km long line of defence stretching from Gaza on the coast to Beersheba inland, supported by German aircraft.
The attack on Gaza on March 26, 1917 was delayed by fog which fortuitously helped the Allied troops encircle Gaza without detection. The ANZACs fought their way into the city in hand-to-hand combat from the north and by sunset they had the city. To the south, the Welsh suffered great losses while taking the high mound of Ali Muntar. As evening approached, the commander, General Murray, not being on the front line, was unaware of this and gave orders (previously decided upon) to withdraw, believing that Turkish reinforcements were on their way (which they weren’t) and that water was scarce, which it wasn’t, since the ANZACs had captured the wells of Gaza. In utter dismay, the troops had to obey the orders. On this fateful day, 523 Allied forces died, almost 3,000 were wounded and over 500 were missing, most of them captured. Discovering the error, the troops were sent back to try to recapture the heights the next morning, but this proved unsuccessful. A second attempt to capture Gaza on April 19, which included bombing from naval ships offshore, also failed and cost 6,000 allied casualties. After this, General Murray was replaced by General Sir Edmund Allenby as commander of the Egypt Expeditionary Force. Harry Chauvel was promoted to the rank of Lieutenant General and given command of the Desert Column.
The two sides were now at a stalemate and it was feared that a situation similar to the Western Front could develop. Creative thinking was needed. General Chetwode put forward the plan that if they were to take Gaza, they would have to trek inland and capture Beersheba first, but they would have to convince the opposition that they were going to attack Gaza again. This would be difficult, but was adopted as the way forward.