Taty Castellanos scored his first goal for West Ham to end their 10-game winless run with a 2-1 victory after extra time over Championship side Queens Park Rangers in the FA Cup third round.
The striker Castellanos in a £25.2m deal from Lazio last week and netted in the first half of extra time to earn their first win since beating Burnley 3-2 in the Premier League on November 8.
Under-pressure West Ham boss Nuno Espirito Santo was smiling at full-time with relief, having had to wait 32 minutes for his side to have a shot as Crysencio Summerville forced Joe Walsh into an excellent save.
But Summerville wasn't to be denied in the first half after the hosts' centre-back Konstantinos Mavropanos was stretched off, which forced nine minutes of added time. Summerville scored in the tenth, smashing in from close range.
QPR, though, hit back midway through the second half when Richard Kone glanced Karamoko Dembele's cross beyond Mads Hermansen.
West Ham were the better side from then on, yet couldn't prevent the tie from going to extra time. They finally went ahead again when Summerville brilliantly turned away from Jimmy Dunne on the left before crossing for Castellanos to power home a header.
Bowen: We're going to need more Castellanos goals
West Ham captain Jarrod Bowen told TNT Sports:
"Really important. When you're in our situation, all you need is a performance, a result to turn the season on its head. We knew coming into this game it wasn't going to be easy. A lot of pressure on us to perform and deliver, and it took 120 minutes.
"It speaks a lot about the squad that we stuck in there, kept going and going and going and got our rewards."
On Taty Castellanos: "He comes with a lot of experience, a really good player and person. He's played two games now and got his goal today so really happy.
"To get your first goal so quickly is really good for confidence. Really happy for him because we're going to need him to score more goals."