Front, in November 1916. The light horse brigades had served dismounted at Gallipoli. In 1916, they were reunited with their horses and formed into the 1st Anzac Mounted Division in Egypt to campaign against Turkish forces in the Sinai and Palestine. Australia also supplied the majority of troops for the newly formed Imperial Camel Corps Brigade. The first Australian division to mount a major attack on the Western Front was the 5th Division. The attack, the Battle of Fromelles, was a disaster with the division suffering 5,500 casualties for no gain. The 1st, 2nd and 4th Divisions, combined as I Anzac Corps, fought the Battle of Pozières and subsequent Battle of Mouquet Farm, part of the Battle of the Somme. In Egypt, the light horse had helped repulse the Turkish attempt to capture the Suez Canal in the Battle of Romani. During 1917, the five divisions in France fought in three Allied offensives: the Battle of Bullecourt (part of the Battle of Arras), the Battle of Messines and the Third Battle of Ypres. Meanwhile, the light horse had entered southern Palestine. After two attempts to break through the Turkish defences at Gaza, the decisive victory was achieved in the Third Battle of Gaza in which the Australians captured the town of Beersheba in a dramatic cavalry charge. By the end of the year, British forces had captured Jerusalem. The German spring offensive of early 1918 broke through British lines north and south of the Somme. The five Australian divisions which had been formed into the Australian Corps on 1 November 1917, were moved south to help halt the German advance. In May, Australian General John Monash was given command of the Australian Corps and the first operation he planned as a corps commander, the Battle of Hamel, is widely regarded as the finest set-piece strategy of the war on the Western Front. The final Allied offensive began with the Battle of Amiens on 8 August, and the Australian Corps, along with the Canadian Corps and the III British Corps, spearheaded the advance north and south of the Somme. By the end of September, the Australian divisions were severely depleted, with only the 3rd and the 5th fit for immediate action. On 5 October the Australian Corps was withdrawn to rest and saw no more fighting before the war ended. In the Middle East, the light horse had endured summer in