Nayef Aguerd headed the midfielder’s corner in to make it 2-1 after Lucas Paqueta’s opener had been cancelled out by Roman Sallai in Germany.
Here’s how David Moyes’s side rated in Germany...
Lukasz Fabianski 6
Made a brilliant save seconds before the goal and almost kept Sallai’s strike out, too.
Vladimir Coufal 6
Getting through a lot of minutes early in the season but is in good form and was solid again here.
Konstantinos Mavropanos 6
Took a right whack to the face off his own teammate Alvarez early on. Block on the line was in vain as Sallai thrashed in seconds later. Passing put teammates in trouble.
Nayef Aguerd 7
Distribution unusually poor but made amends with cracking header to win the game.
Thilo Kehrer 6
Back in his homeland and asked to play in the least natural of his defensive positions but did well enough.
James Ward-Prowse 8
Several important defensive headers in his own box and crucial in helping West Ham regain some control after Freiburg flurry at start of second half. Corner, inevitably, made winner.
Edson Alvarez 6
Reads the game superbly. Picked up his customary yellow card, though, which Moyes says is becoming a concern.
Pablo Fornals 6
Industry covering out wide from central midfield gave Paqueta licence to roam.
Mohammed Kudus 7
Fine touch under pressure started move for opener. Hit the post with a shot that somehow trickled through the goalkeeper, then fired just wide of clincher late on.
Jarrod Bowen 7
Marked his England call-up with the assist from the opener. Led the line and looks a viable alternative to Michail Antonio, who is injured. Should have settled it in final minute.
Lucas Paqueta 8
Known for his flair but header was just brilliant. A monstrous leap. Had the ball in the net again soon after but ruled offside. So good to watch.
Emerson (Kehrer 72’) 6
Tomas Soucek (Fornals 72’) 6
Said Benrahma (Kudus 81’) N/A
Danny Ings (Ward-Prowse 90’) N/A
Divin Mubama (Paqueta 90’) N/A