By mid-December 1916 the Egyptian Expeditionary Force had advanced across the Sinai to within sight of the original objective of the campaign, the town of El Arish. The Ottoman garrison abandoned El Arish and the town was occupied by the Anzac Mounted Division and the Imperial Camel Corps Brigade on 21 December without a shot being fired. Soon after, reconnaissance patrols found that the Ottoman garrison guarding the oasis of Magdhaba, 40 km inland, showed no signs of being withdrawn. General Philip Chetwode, commander of the Desert Column, ordered the Anzac Mounted Division and the Imperial Camel Corps Brigade to attack Magdhaba as soon as they could be relieved at El Arish by British infantry. The arrival of Scottish soldiers of the 52nd (Lowland) Division the following day was the signal for the attack.
After an all-night ride across the desert the assault force halted 6 km from Magdhaba, within sight of the garrison’s campfires. Major-General Harry Chauvel, commander of the Anzac Mounted Division, used the hours before dawn to reconnoitre the Ottoman positions and devise a detailed plan of attack. The defences consisted of five large redoubts ringed around the oasis of Magdhaba and the wadi that ran through it. These were buttressed by a series of trenches that filled many (but not all) of the gaps between them. Defending these positions were two battalions of the Ottoman 80th Infantry Regiment, supported by a battery of mountain artillery (four guns) and a small detachment of Arab camelry, giving the garrison a total strength of nearly 1400 men.
Chauvel decided to encircle the Ottoman positions to ensure the garrison could not escape and then overwhelm the defences by attacking the redoubts from all sides. The New Zealand Mounted Rifles Brigade was tasked with attacking the redoubt guarding the north-eastern approach to Magdhaba and its surrounding trenches. By 10 a.m. everyone was in position and the attacks began, supported by the 13-pounder field guns of the Somerset and Inverness batteries, Royal Horse Artillery, and the mountain guns of the Hong Kong and Singapore (Mountain) Battery. The troopers of the Wellington and Canterbury Mounted Rifles advanced on horseback to within 1.5 km of the defences before dismounting to attack on foot. At this point the volume of Ottoman rifle and machine-gun fire intensified, and the New Zealanders were also targeted by an Ottoman mountain-gun battery sited directly opposite them. The Ottoman fire was inaccurate and casualties were extremely light, but the progress of the New Zealand attack was slowed considerably. The same was true of the Australian Light Horse and Camel brigades, and after four hours of fighting there was little to show for their efforts.
By this stage the horses of the Anzac Mounted Division had been without water for nearly 20 hours. Chauvel knew that he would soon have to decide whether to break off the attack and return to El Arish or continue in the hope that his men could capture Magdhaba and its wells before the horses were fatally exhausted by thirst. At that moment news came that the cameleers, together with troopers of the 3rd Australian Light Horse Regiment, had overrun the redoubt to the west of the New Zealanders. With this breach of their perimeter the resistance offered by the mostly Arab Ottoman garrison began to crumble. Within an hour another redoubt had fallen and by 3.30 p.m. the New Zealanders had rushed the Ottoman trenches in their sector. Soon after, the Ottoman mountain battery that had been firing at them all day was captured, guns intact, by a small party of men from the Canterbury Mounted Rifles. By now the Turkish and Arab soldiers were surrendering in droves. The last organised resistance was mopped up by 4.30 p.m. and the battle for Magdhaba was over.
Ottoman casualties amounted to 97 killed and 1282 Turkish and Arab prisoners taken, including the Turkish commander of the 80th Infantry Regiment, Khadir Bey. As well as the mountain guns captured by the New Zealanders, the booty included four machine guns, 1052 rifles, 100,000 rounds of small-arms ammunition, 40 horses and 51 camels. The attacking cameleers and Anzac mounted troopers suffered 146 casualties (22 killed and 124 wounded), with 51 horses killed or wounded. New Zealand losses were nine killed and 46 wounded (including 10 wounded New Zealand cameleers from the Imperial Camel Corps Brigade).