Rarely has a late winner against such limited opposition with the stakes so low been greeted at Anfield with such fervour.

As the seconds ticked away against Queens Park Rangers, Liverpool were on the brink of completing another tale of woe.

Brendan Rodgers' side should have been out of sight but looked to have carelessly tossed away another two points.

Some gilt-edged chances had been spurned following Philippe Coutinho's classy opener and some shambolic defending had put the equaliser on a plate for Leroy Fer.

Steven Gerrard's send-off had taken another painful turn for the worse with Robert Green pushing away his spot-kick 11 minutes from time, reports the Liverpool Echo.

The gloom was about to descend a little further. But Gerrard has never been one to accept his fate.

The past 17 years have been littered with glorious examples of him providing the inspiration to drag the Reds kicking and screaming over the line.

Video Loading

Video Unavailable

Click to playTap to play

The video will start in 8Cancel

Play now

And just when his remarkable story looked set to be limping to an underwhelming conclusion, he added another rescue act to his unrivalled Anfield collection.

When Coutinho delivered a 87th-minute corner, there was only one winner.

Gerrard got away from Bobby Zamora and soared above Joey Barton to emphatically head home in front of the Kop. It was a show of burning desire.

The outpouring of emotion showcased just what it meant to the club’s departing talisman on his penultimate appearance at Anfield.

The beaming skipper raced towards the corner, planting a kiss on the liver bird on his shirt before being mobbed by his jubilant team-mates.

His first goal since February – his 184th for the club - took him above Robbie Fowler and into fifth place in the club’s all-time list of scorers. Only Ian Rush, Roger Hunt, Gordon Hodgson and Billy Liddell have been more prolific in the Reds’ history.

Gerrard's legacy is secure despite no fairytale ending

There will be no Hollywood ending for Gerrard prior to his move to Los Angeles Galaxy in July.

Liverpool’s disastrous display at Wembley last month put paid to that but this season won’t dent his legacy.

There was a deafening ovation when he was substituted late on and there will be another when he graces Anfield for the final time on May 16.

An era is coming to an end and Kopites owe a debt of gratitude to Gerrard which they can never repay.

It was an uplifting end to an afternoon which had begun with the banner ‘Rodgers Out Rafa In’ being flown over the stadium.

Even fans whose patience has been stretched to the limit by Liverpool’s slump over the past six weeks shook their heads in dismay.

QPR, who look doomed to relegation, arrived with the worst defensive record in the top flight but it was Chris Ramsey’s men who made the brighter start.

The visitors had the ball in the net inside 55 seconds but Matt Phillips’ corner had gone out of play before Fer turned it home.

Liverpool were second best and the warning signs were there. Glen Johnson somehow lost a sprint with veteran Richard Dunne down the left before Dejan Lovren clumsily upended Charlie Austin.

The ensuing free-kick from Phillips wasn’t dealt with but to the Reds’ relief Steven Caulker volleyed wide. Simon Mignolet was then called into action to push behind Fer’s 25-yarder before the hosts belatedly came to life.

Rickie Lambert work-rate puts Mario Balotelli to shame

In the 20th minute Liverpool broke the deadlock. Lambert, who was making his first league start since December, showed great awareness to pick out Coutinho on the far side of the box.

The little Brazilian took a touch to steady himself and expertly curled into the top corner for his eighth of the campaign.

The lead flattered Liverpool but once in front they went on to dominate.

Martin Skrtel flashed a header wide before the captain failed to hit the target after stretching to reach Sterling’s lay-off.