It was engaged at all three Battles of Gaza. At the First Battle (26 March 1917), the main attack was made by 53rd (Welsh) Division with 161st Brigade in support. Towards the end of the day the 161st Brigade was ordered to take Green Hill: despite heavy fighting the attack was a complete success and the brigade held the whole position by nightfall. However, confusion set in, and 53rd Division withdrew during the night. The men of 161st Brigade were enraged by the order to withdraw. The following day patrols showed that the Turks had not reoccupied the position; 1/7th Battalion was sent up to support the patrols, but a violent Turkish counter-attack finished the battle. Casualties were heavy, including many men missing after the fighting withdrawal. The brigade was not heavily engaged during the Second Battle of Gaza (17–19 April 1917:) 1/7th Bn was detached and assigned to the Imperial Camel Corps (ICC), which was protecting the left flank of 54th Division, while the rest of the brigade was in divisional reserve and most of its casualties were due to shellfire. During the summer months, 161st Brigade held the line without suffering serious casualties, and by the end of October was fully up to strength for the forthcoming Third Battle of Gaza (1–3 November 1917). On the morning of 2 November, the 54th Division put in a holding attack at the El Arish Redoubt. The fighting was confused, but the division took all its objectives. However, the 1/7th Bn found that the fourth objective, 'John Trench', was a mere scrape in the ground and could not be held. The brigade commander considered that this battalion had the hardest time of all that day. At 04.00 on 3 November, 1/7th made a renewed attempt to take their objective, but were again held up by Turkish machine-gun fire, with heavy casualties. During the rapid pursuit after the fall of Gaza, 1/4th and 1/6th Essex assisted the Anzac Mounted Division, while 1/5th and 1/7th were left marching in the rear. As well as battle casualties, the whole brigade suffered considerably from influenza during November–December 1917 and throughout 1918. The weakened brigade was mainly engaged in line-holding until September 1918. 54th Division was held in readiness to move to reinforce the Western Front, but in the end was not sent. The 54th Division returned to the offensive for the Battle of Megiddo (19–25