Warneton, a village to the south of Ypres and east of Messines, was the focus for operations of the 3rd Australian Division in mid-1917. The village gave its name to strong German defensive line consisting, like most German defensive positions around the Ypres Salient, of mutually-supporting concrete pillboxes and thick belts of barbed wire. Following the battle of Messines, efforts were made to advance the British front to within striking distance of the Warneton Line. On 23 June 1917 the 3rd Australian Division joined this effort and the 11th Brigade was tasked with digging a new front line several hundred metres forward of the old one. Assailed by both the elements and German fire, it was not an easy task for the working parties, and the brigade's time on this task was subsequently remembered as a feat of endurance which became known as "the eighteen days". As well as its defensive works, the Brigade was also required to mount a series of raids and small attacks in an effort to drive-in the German outposts established forward of the main defences.
In order to finally destroy these advanced posts an attack was launched by the 42nd and 43rd Battalions of the 9th Brigade on the night of 31 July, which also served as a diversion for an offensive taking place further to the north. The posts were captured and held in the face of heavy counter-attacks, the Germans had a ready supply of reinforcements in the posts of the Warneton Line, advancing the British line another few hundred metres.