Tomas Soucek scored a late winner as West Ham secured their place in the Europa League knockout stage at Serbian side Backa Topola.
It had been a turgid display from David Moyes' side with only one shot on target until Soueck met Maxwel Cornet's cross for his fifth goal in his past five games for club and country.
The goal means West Ham have scored in 20 successive European games, winning 18 and losing only once.
It leaves Moyes' side top of Group A and they only need a point against Freiburg on 14 December to earn top spot, and avoid a play-off in February against a side finishing third in their Champions League group.