Jake Livermore's last-gasp goal gave promotion-chasing West Brom a dramatic 3-2 victory at QPR.
Tomer Hemed's 75th-minute penalty seemed to have earned a point for struggling QPR, who have now lost six consecutive league games.
However, with seconds remaining, Livermore nudged home Mason Holgate's low cross to take Albion to within one point of second-placed Sheffield United and three of Championship leaders Norwich.
Luke Freeman's equaliser cancelled out Jefferson Montero's early opener before Jacob Murphy restored Albion's lead just after the hour mark after capitalising on a terrible mistake by Joel Lynch.
Hemed, recently back from injury and on as a substitute, fired home from the spot after Craig Dawson was adjudged to have fouled the on-loan Brighton striker.
But Livermore had the final word for Albion, who had gone ahead after just five minutes courtesy of Montero's first goal for the club.
Montero, making his first start for the Baggies since arriving on loan from Swansea, pounced on the loose ball to score after Murphy's goal-bound effort was blocked on the line by Darnell Furlong.
Freeman hauled Rangers level 10 minutes before half-time – the playmaker's seventh goal of the season.
After Massimo Luongo dispossessed Stefan Johansen, Nahki Wells laid the ball to his left to Freeman, who fired past keeper Sam Johnstone at the near post.
Rangers, without a league win since Boxing Day, were on top when defender Lynch should have let a long ball drift through to keeper Joe Lumley but instead inexplicably headed straight to Murphy, who skipped past Luongo and blasted into the far corner.
Steve McClaren's side found another equaliser through Hemed from the spot and both teams had chances before Livermore's late winner.
Kieran Gibbs' low cross from the left ran to Murphy, who shot straight at Lumley, before Johnstone saved from Bright Osayi-Samuel after the winger had been set up by fellow substitute Ebere Eze.
Johnstone also kept out a strike from Eze, who made a big difference for Rangers after being sent on in place of target man Matt Smith at half-time.
Murphy and former QPR winger Matt Phillips both saw shots deflected narrowly wide as Albion piled on the pressure in the final minutes before finally getting their reward.
ga('create', 'UA-72310761-1', 'auto', {'name': 'pacontentapi'});
ga('pacontentapi.set', 'referrer', location.origin);
ga('pacontentapi.set', 'dimension1', 'By Press Association Sport staff');
ga('pacontentapi.set', 'dimension2', 'e829d56b-9bfd-4663-b9cb-ca2c53476ca5');
ga('pacontentapi.set', 'dimension3', 'paservice:sport,paservice:sport:club-news,paservice:sport:football,paservice:sport:match-reports');
ga('pacontentapi.set', 'dimension6', 'story');
ga('pacontentapi.set', 'dimension7', 'composite');
ga('pacontentapi.set', 'dimension8', null);
ga('pacontentapi.set', 'dimension9', 'sport:football');
ga('pacontentapi.send', 'pageview', { 'location': location.href, 'page': (location.pathname + location.search + location.hash), 'title': 'Livermore earns West Brom vital victory at QPR'});