A defiant performance from Manchester City denied them a single point from a hard-fought encounter.
An electric Anfield crowd gave old boy Robbie Fowler a warm welcome before the final home match of the season got in the way.
The game became physical after Kevin Horlock was shown a yellow card in the eighth minute for a crunching tackle on Dietmar Hamann. The referee then invited a booing session when he failed to blow his whistle as Milan Baros was brought down in a scramble for the ball inside the penalty area.
The Reds had many chances on goal saved by the heroics of Peter Schmeichel, the Danish keeper kept a clean sheet in the first half through a save with his elbow from a thundering free-kick taken by Danny Murphy.
At the start of the second half a deft through ball from Shaun Wright-Phillips left Nicolas Anelka open on goal, but Jerzy Dudek closed the shooting angle down and he fired into the sidenetting.
This was a warning shot for the home side who had got off to a slow start. After a few attempts on goal, Liverpool got a lucky break when El Hadji Diouf's blocked cross bounced high into the path of Baros who fired a superb volley into City's net in the 58th minute.
As the referee courted controversy when he awarded Anelka a penalty after a Djimi Traore challenge. The Kopites' groans let the referee know it was no stronger than the challenge which felled Baros in the first half.
The Frenchman stepped up and calmly stroked the ball into the left corner in the 70th minute to level the scores.
And in injury time it was again Anelka who came to the fore and plunged a dagger into the hearts of Anfield, when he scored the winner from a clever cross by Wright-Phillips.