Steven Gerrard grabbed the winner in his second-to-last Anfield appearance to hand Liverpool a hard-fought 2-1 victory over Queens Park Rangers on Saturday.

The Reds had grabbed a first-half lead through a fine Philippe Coutinho conversion, but the visitors stemmed their tide and later levelled the game through Leroy Fer.

Gerrard saw a penalty saved within five minutes but, as the seconds ticked away, he popped up with a superb header at the Kop end to secure a return to winning ways.

Brendan Rodgers made three changes to his starting XI, with Gerrard returning to captain the Reds in his penultimate home appearance for the club, plus Adam Lallana and Rickie Lambert taking up positions in attack.

Both sides wore black armbands to pay their respects to the wife of QPR defender Rio Ferdinand, Rebecca, who sadly passed away overnight.

The first troublesome strike of the encounter was fired on 10 minutes by Fer, who held off the attention of Gerrard and aimed low for the left corner - but Simon Mignolet stretched out quickly to save.

It had been a sprightly start by the Londoners, who arrived on Merseyside desperately needing three points in their battle to avoid relegation. Liverpool soon took a grip on the contest, however.

A 25-yard drive wide by the skipper and an attempt by Lambert from the edge of the area that was comfortable for goalkeeper Robert Green were warning signs.

And the breakthrough arrived on 19 minutes. Lambert bounded forward on the right flank and realised that his best option was a pinpoint side-foot across the box to Coutinho, who calmly controlled and curled a half-volley high into the net.

The perfectly-placed finish was the Brazilian's eighth goal of the campaign and second past Rangers.

With Coutinho excelling from his central role and Lambert a focal point to play off at the top end of the field, the Reds were almost entirely on the attack in the lead-up to half-time.

Raheem Sterling momentarily thought he had doubled the advantage, having collected a Jordan Henderson backheel amid a packed area, but the linesman raised his flag for offside to deny any celebrations.

Five minutes before the interval, a set-piece in shooting distance was set up for Gerrard to command. He whipped it well, sending it from right to left in search of the near corner, but Green launched to his side to claw away.

It should have been 2-0 twice shortly after the restart.

Sterling's anticipation won possession in QPR territory and with their defence on the back foot, allowing the No.31 to feed Coutinho and him in turn to Lallana. The England international composed himself for the hit but screwed the ball off target as the Kop braced for a second.

Next Henderson shaped a stunning delivery from out on the right flank which bypassed the away backline, but the waiting Sterling somehow clipped over the crossbar at the far post - to his own frustration and bemusement.

Past the hour, Lambert could not quite get a Lallana tee-up under control as he moved inside the left channel, though he still managed to slice a shot toward the opposite corner that Green saved.

Keen to find another goal, Rodgers introduced Jordon Ibe for the final quarter, almost two years on from the young forward's debut for the club against the same opponents.

He wasted no time in scampering to the byline and crossing to the middle - QPR half-cleared to Gerrard, whose daisy-cutter was deflected behind. The No.8 sent in the corner and Dejan Lovren's strong header drew a smart stop from Green.

Having kept themselves in contention by limiting Liverpool to one, Chris Ramsey's charges then struck back.

Joey Barton delivered a dangerous corner which found Fer and the Dutchman twisted his frame to smash the ball through the crowd and beyond Mignolet to equalise in the 73rd minute.

Within five minutes the Reds earned a glorious opportunity to restore their lead, with Nedum Onuoha adjudged to have hauled down Martin Skrtel inside the penalty box.

Up stepped Gerrard from 12 yards in front of the Kop, but the captain's side-foot strike to the right was pushed away and out by Green, who had made an early decision to dive in that direction.

Onuoha had been booked for his foul in conceding the spot-kick and was soon heading back to the dressing room early, dismissed after preventing Ibe from running clear on the counter-attack.

But Gerrard was not in the mood to settle for a draw and when Coutinho assumed corner duties and delivered an inviting ball, the talisman rose higher than anyone to nod firmly past Green and grab the win.