158th Brigade returned to the canal on 14 August and spent the next three months at Ferdan. By the end of the year it was back at Romani, the Egyptian Expeditionary Force (EEF) having cleared Sinai of the enemy. On 20 January 1917 53rd (W) Division began the march across the Sinai Desert, reaching Wadi el Arish at the end of the month. It moved up to Rafah on 21 March. After an approach march beginning on 24 March, the EEF attacked Gaza on 26 March, launching the First Battle of Gaza. 53rd (W) Division in the Desert Column was ordered to cross the Wadi Ghuzze towards Gaza itself, masked by the mounted divisions sweeping round the flank. The division was led by 160th Bde, followed by 158th, 1/5th RFW leading. The battalion's guide got lost and there was an overnight fog, so 158th Bde was late crossing the wadi that morning, but by 06.30 it reached the edge of the Mansura ridge overlooking the plain of Gaza. At 11.30 the division was hurriedly ordered to attack, even though the artillery had not yet established communications. 158th Brigade set out shortly after 11.45 to attack Ali Muntar, with 1/5th RWF leading, preceded by a strong patrol. The whole advance, watched by the mounted divisions, was 'a model in precision and steadiness'. After leaving the protection of Mansura the battalion immediately came under shrapnel fire as it marched across open ground parallel to the Ali Muntar defences before wheeling left and moved down to a small cactus garden about from the crest of Ali Muntar. Here Lt-Col Borthwick waited for the other battalions to catch up, and firing became general, with the battalion troubled by enemy fire coming in from Green Hill to the left as well as in front. The brigadier reinforced the battalion with machine guns and sent another battalion to take Green Hill. The whole line then advanced again. About 40 men of 1/5th RWF dashed through the machine gun fire and made a lodgement in the trenches east of Ali Muntar mosque, capturing Turks, Austrians and Germans, and held it fast despite enemy counter-attacks. By 18.30 the whole Ali Muntar position was won, and by nightfall Gaza was almost completely surrounded, with patrols from 53rd (W) Division in the eastern streets linking up with the ANZAC Mounted Division. However, the senior British commanders were unaware of the success, and had already ordered the mounted troops to withdraw to water their horses. 53rd (W) Division was ordered to dig in on a line near Wadi Ghuzze next day; isolated at Green Hill, 1/5th RWF also had to fall back. At the end of the day the whole division was withdrawn across the wadi, 158th Bde arriving at 01.15 on 28 March. The battalion's casualties were 2 officers and 33 ORs killed, 9 officers and 186 ORs wounded, and 9 ORs missing.Bullock, pp. 44–6.MacMunn & Falls, Vol I, pp. 283–90, 293–7, 301–3, 305–14, Sketches 14 & 15.Ward, pp. 63, 66–7, 73–82, 85, 90–7.
