Captain Steven Gerrard may be on the final leg of his Liverpool farewell but the midfielder showed he still has a head for the big moments.
After missing the penalty to put them back in the lead after Leroy Fer's volley had cancelled out Philippe Coutinho's first-half goal, he stole in to head home in the 88th minute for a 2-1 win which leaves 10-man QPR's survival hopes hanging by the slenderest of threads.
The hosts looked like they had paid the price for not taking their chances when Fer's strike gave QPR hope of a point with 17 minutes remaining, but Gerrard got them out of trouble.
There will not be many more moments like this and Anfield rose as one for an extra special cheer as he was substituted soon after.
In two weeks' time Gerrard will make his final appearance on this ground before he leaves for Los Angeles Galaxy and you would not rule out a fairytale finish of some sort.
His late winner leaves QPR, who had Nedum Onuoha sent off for two bookable offenses within the space of four minutes, seven points from safety with just nine to play for and Manchester City at the Etihad Stadium next up.
Both sets of players wore black armbands for the match following this morning's tragic news that Rio Ferdinand's wife Rebecca had died after a short battle with cancer.
The QPR fans also chanted their support for the Hoops centre-back at the start of the match, which began with the visitors on top.
They had a goal disallowed early on before Fer saw his shot well saved by Simon Mignolet.
However, Liverpool weathered that storm and went on to claim the points – albeit it in far from comfortable fashion.
The win ended a miserable fortnight for the Reds after they lost an FA Cup semi-final and saw their slim hopes of a top-four finish virtually extinguished.
But there was little in the way of celebration as they know their chance has gone, while visitors traipsed off knowing their Premier League existence is now extremely fragile.
After Leicester's fourth win in five matches earlier in the day, Chris Ramsey's side knew they had to get something out of the game and safety seems a long way off.
They were given half-a-chance by Liverpool who wasted a host of chances and should have been out of sight well before their opponents got back into the game.
With Daniel Sturridge and Mario Balotelli injured striker Rickie Lambert made his first Premier League start since December 6 and managed more than a passable impression of a half-decent centre-forward.
Admittedly he did not score but his hold-up play at least gave the midfield runners something to work with and his vision and pass across almost the width of the penalty area picked out Coutinho for the opening goal.
Whatever the 33-year-old does between now and the end of the season, even taking into consideration the current paucity of resources up front, it is unlikely to make a difference to his future with the exit door beckoning for the England international.
Coutinho remains very much part of the future and his curling 19th-minute finish, after shifting Lambert's pass inside onto his right foot, was another to add to this season's showcase of impressive goals.
It was his fifth in the league and he is now only two behind the team's leading scorer Raheem Sterling, a statistic which tells its own story about why Liverpool's top-four challenge has faltered.
Gerrard, returning to the side after missing the midweek defeat in Hull, tried to add to his league tally of six but sliced two wide, saw Rob Green palm away a free-kick in the first half and tip another shot around the post after the break.
He eventually got there, after his spot-kick error, but it all felt a bit labored for the hosts for whom Sterling missed a glorious chance from five yards out after the break.
Lambert forced Green into a low save and Dejan Lovren's header was pushed out by the goalkeeper who did more than enough to keep his side, who lost Steven Caulker to a suspected broken hand at half-time, in the game.
When the unmarked Fer volleyed home in the 73rd minute – the midfielder subsequently revealing a "stay strong family Ferdinand" message under his shirt – QPR sensed an upset, but Onuoha's shirt-pull on Martin Skrtel conceded the penalty and earned his first yellow card before a wild hack on Liverpool substitute Jordon Ibe saw him dismissed.
But just when it seemed they had clung on for a point Gerrard nipped in to nod home Coutinho's corner.
It was a moment to savor as there will not be many more like it.
Mobile app users, watch the video highlights.
200+ Channels With Sports & News
- Starting price: $33/mo. for fubo Latino Package
- Watch Premier League, Liga MX & Copa Libertadores
The New Home of MLS
- Price: $14.99/mo. for MLS Season Pass
- Watch every MLS game including playoffs & Leagues Cup
Many Sports & ESPN Originals
- Price: $10.99/mo. (or get ESPN+, Hulu & Disney+ for $14.99/mo.)
- Features Bundesliga, LaLiga, NWSL, & USL
2,000+ soccer games per year
- Price: $7.99/mo
- Features Champions League, Serie A, Europa League & EFL
175 Premier League Games & PL TV
- Starting price: $7.99/mo. for Peacock Premium
- Watch 175 exclusive EPL games per season