In early 1917, the Imperial Mounted Division was formed from the 3rd and 4th Light Horse Brigades and two British mounted brigades. The division first saw service during the First Battle of Gaza, which occurred in southern Gaza on 26 March 1917. At around noon two mounted brigades of the Anzac Mounted Division attacked Gaza from the north and east. At 6.00 pm the Turkish position had become perilous with the ring closing tightly around Gaza. However, in a decision that dismayed most of their soldiers the British commanders decided to call off the attack and retreat, delivering victory to the Turks. A second attempt was made to capture Gaza on 19 April by which time the Turkish defences were even more formidable and the task confronting the British even more difficult. This battle became known as the Second Battle of Gaza. The Anzac Mounted Division played only a minor role in this battle suffering only 105 casualties out of the 5,917 suffered. The second battle of Gaza was a disastrous defeat for the Allied forces.