Taty Castellanos scored an extra-time winner as West Ham avoided an embarrassing FA Cup exit by edging past QPR 2-1.
The Argentinian was brought in for £26million from Lazio last week in a bid to salvage the Hammers’ terrible Premier League season.
That may yet prove beyond him, but Castellanos did at least take their FA Cup campaign beyond the third round with his first goal for the club.
Richard Kone had earlier cancelled out Crysencio Summerville’s opener as Rangers briefly threatened a result which would have shocked even the most ardent Hoops fan.
The Hammers’ league season has been so bad – they are without a win in 10 matches – that they looked susceptible to an upset at the hands of any reasonably competent Championship team.
But QPR’s woeful FA Cup record – they have now lost in the third round 53 times, more than any other club – suggested they were unlikely to achieve the feat.
With West Ham having just lost crucial games against fellow strugglers Wolves and Nottingham Forest to lie seven points from safety, a visit from Rangers is looking increasingly likely to be a league fixture next season.
And if this was an early taste of life in the Championship, they were almost caught out from a corner which Rayan Kolli headed wide at the far post.
It took 32 minutes for the hosts to have a shot, but when they did it was a decent one, Summerville’s angled effort tipped over the crossbar by Rangers keeper Joe Walsh.
They lost Konstantinos Mavropanos to a nasty head injury, and after a six-minute delay he was lifted on to a stretcher. It was later confirmed by West Ham that the Greek defender was conscious.
Under-pressure boss Nuno Espirito Santo opted to dispense with the five-man defence he had started with and replace Mavropanos with his other new striker, Pablo Felipe.
And in the ninth minute of first-half stoppage time the Brazilian made an impact, smuggling the ball infield and playing in Soungoutou Magassa, who recycled it for Summerville to take a touch and lash in his first goal of the season.
However, in the 65th minute Rangers deservedly hauled themselves level when Kolli fed Karamoko Dembele.
He turned away from Summerville and lifted in a cross which Kone headed beyond Hammers keeper Mads Hermansen and inside the far post.
Castellanos was twice denied by goal-line blocks from Rangers skipper Jimmy Dunne and saw a 20-yard drive tipped over by Walsh, before Kone cleared a Tomas Soucek header from underneath his own crossbar.
Into extra time, and Soucek and Summerville were denied by Walsh before the winner arrived in the ninth minute of the first additional period.
Summerville did brilliantly to spin away from Dunne and cross for Castellanos to head powerfully past Walsh and spare West Ham from yet more misery.