Grenadier Regiment 9 made it back. The village was consolidated inside a "box barrage" maintained all night and a large counter-attack was repulsed at By noon on 11 July, the 23rd Division was relieved by the 1st Division, having suffered up to 10 July. The German positions between Mametz Wood and Contalmaison, were finally captured by the 17th (Northern) Division, after they were outflanked by the capture of the village and the southern part of the wood, although bombing attacks up trenches on 9 July had failed. At a surprise bayonet charge was attempted by a battalion each from the 50th and 51st brigades, which reached part of Quadrangle Support Trench on the left but eventually failed with many casualties. After the capture of Contalmaison next day, an afternoon attack by part of the 51st Brigade from the sunken road east of the village reached Quadrangle Support Trench. Parties of the 50th Brigade attacked westwards up Strip Trench and Wood Support Trench, against German defenders who fought hand-to-hand, at great cost to both sides, before the objective was captured. Touch was gained with the 38th (Welsh) Division in the wood and the 23rd Division in the village, before the 21st Division took over early on 11 July; the 17th (Northern) Division had suffered since 1 July. Mametz Wood At on 3 July, XV Corps advanced north from Fricourt and the 17th (Northern) Division reached Railway Alley, after a delay caused by German machine-gun fire at A company advanced into Bottom Wood and was nearly surrounded, until troops from the 21st Division captured Shelter Wood on the left; German resistance collapsed and troops from the 17th (Northern) Division and 7th Division occupied Bottom Wood unopposed. Two field artillery batteries were brought up and began wire cutting around Mametz Wood; the 51st Brigade of the 7th Division, having lost about by then. In the 21st Division area on the boundary with III Corps to the north, a battalion of the 62nd Brigade advanced to Shelter Wood and Birch Tree Wood to the north-west, where many German troops emerged from dugouts and made bombing attacks, which slowed the British occupation of Shelter Wood. German troops were seen by observers in reconnaissance aircraft, advancing from Contalmaison at and the British infantry attempted to envelop them, by an advance covered by Stokes mortars, which quickly captured Shelter Wood. The British repulsed a counter-attack at with