Manuel Pellegrini admitted he saw the worst and best of West Ham as they came from behind to snatch a dramatic 4-3 win over Huddersfield.
The visitors, rock bottom of the Premier League and all but doomed to relegation, were leading 3-1 through Juninho Bacuna and a double from Karlan Grant.
But Angelo Ogbonna pulled one back and substitute Javier Hernandez scored twice to shove heartbroken Huddersfield another step closer to the Sky Bet Championship.
“I hate it when my team play badly. I think everyone was disappointed when we were 3-1 down but we did well to come back,” said Hammers boss Pellegrini.
“The victory is very good for the fans, especially when you are losing 3-1 and you don’t give up. That reflects the character of the team
“It’s good for everyone. For the fans, for me, the players. It’s good for everyone except Huddersfield.”
West Ham led through Mark Noble’s penalty but trudged off at the break to boos after Bacuna and Grant were left unmarked from set-pieces.
Grant curled in a third and there were more boos for Marko Arnautovic, back in the starting line-up for the first time since trying to engineer a move to China in January but taken off with more than 20 minutes remaining.
Yet maybe the departure of the moody Austrian galvanised West Ham as Ogbonna pulled one back before Hernandez buried a diving header at the far post.
Even then Huddersfield could have won it, only for Phillip Billing and Jason Puncheon to fluff their lines from eight yards out.
So there was an air of inevitability when, in stoppage time, Felipe Anderson lofted the ball into the area and Hernandez glanced it home to settle a barmy match.
“Javier’s an important player. Every time he’s inside the box he is dangerous,” added Pellegrini.
“He started on the bench so did not have so much pressure. I always say to players that subs are so important, they must have their minds on the game.”
It was hard not to feel for Huddersfield, destined for the drop but so close to securing only a fourth win of the season.
Their crestfallen manager Jan Siewert said: “I can’t describe my feelings right now. Look at my face.
“We scored three goals, we haven’t done that all year, so the match plan worked. I was working so hard all week.
“I am so proud of the performance. There are reasons we are bottom of the table but we kept fighting, and you saw that today.”
– Press Association