Following the failed attack around Bullecourt, the division was withdrawn from the line for rest and reinforcement. The next major attack it took part in came in June, when it participated in the Battle of Messines, in Flanders, Belgium. Fought as part of efforts to secure the Wytschaete – Messines Ridge, which existed south of a salient in the line around Ypres, providing the Germans with observation of the Allied positions, the battle saw the 4th Division brought in to reinforce the British 25th Division, the Australian 3rd and the New Zealand Division. Although slated to be the corps reserve, during the attack, launched on 7 June, the division was called upon to secure a large gap that developed in the line after the neighbouring British corps was held up. In this effort, the division was tasked with attacking the Oosttaverne Line late in the day. Enduring shelling by their own guns, and coming up against German pillboxes for the first time, the division took heavy casualties, but managed to secure all but a small part of the line where the Australian sector joined the neighbouring British sector.