It was a bright start for the Terriers which also saw an impeccably observed minute's applause from all sides of the ground in the 15th minute for 15-year-old Katelyn Dawson who tragically passed away after a road traffic accident in Moldgreen earlier in the week.
However, a defensive mistake by Joe Lolley led to Hammers’ captain Mark Noble slotting past Jonas Lössl to put the visitors in front before a Town revival saw the aforementioned Lolley atone for his previous error.
The attacking midfielder received the ball from Tommy Smith, before gliding past Arthur Masuaku and bending the ball past Adrian in the West Ham goal to make it 1-1.
However, the good work was undone 11 seconds into the second-half when Marko Arnautovic made it 2-1 with a left footed volley after a long-ball upfield.
Ten minutes later the Hammers had a third, Arnautovic gliding past Christopher Schindler before showing great vision to find Manuel Lanzini to fire past Lössl.
A fourth soon followed – a counter-attack by West Ham saw Arnautovic once again tee-up Lanzini for his second of the game.