In early 1918, the 5th Pioneers supported the Allied defensive actions that were fought in response to the German spring offensive. In mid-April, during the Second Battle of Villers-Bretonneux, elements of the battalion were subjected to a gas attack whilst guarding road-mines around the village. They were later employed to dig a defensive switch to provide flank defence prior to the German attack and connect the first and second line of defensive systems. After the Allies had blunted the German offensive, in the lull that followed the Allies sought to regain the initiative through a series of minor attacks before going on the offensive. During this period, the battalion took part in an attack around Morlancourt at the end of July, during which they suffered 16 casualties. The Allies launched their Hundred Days Offensive around Amiens in August 1918, which ultimately brought about an end to the war. As a part of this offensive, the 5th Pioneers supported actions around Peronne at the end of August.