Hat-trick hero Milan Baros grabbed a late penalty as Liverpool snatched victory against Crystal Palace.
Baros put Liverpool ahead from the spot at Anfield after he was fouled by Palace defender Mikele Leigertwood.
Joonas Kolkka equalised with a superb angled drive just before half-time, only for Baros to pounce again when he turned in Harry Kewell's pass.
Michael Hughes headed home Kolkka's cross on 52 minutes, but Baros held his nerve to steer home the winner.
Having lost their 100% Premiership home record against Birmingham seven days earlier, Liverpool were presented with an immediate chance to make amends.
But they looked to have paid the price for two defensive lapses until Baros struck in the dying seconds.
Rafael Benitez's side started well as Baros marked his return from a hamstring injury by winning a 23rd-minute penalty.
The Czech striker looked to have overrun the ball as he burst into the area, but he was shoved in the back by Leigertwood and referee Phil Dowd pointed to the spot.
Baros picked himself up and calmly wrongfooted Palace keeper Gabor Kiraly.
Liverpool fans thought Baros had won another spot-kick just minutes later when he went down under the challenge of Emmerson Boyce.
But this time Dowd decided he had gone down too easily and penalised him for picking up the ball.
Palace looked short of inspiration in attack without injured top-scorer Andy Johnson, but grabbed a surprise leveller through Kolkka on 44 minutes.
Tony Popovic caught the Liverpool defence napping with a lobbed pass down the left, and Kolkka crashed a rising shot past Chris Kirkland.
Liverpool regained the lead straight away, however, when Xabi Alonso's free-kick was turned across goal by Kewell and Baros netted from close range.
The home side could have extended their lead before half-time but Kiraly superbly clawed away Luis Garcia's shot after a great cross from John Arne Riise.
It looked only a matter of time before Baros completed his hat-trick as he headed one chance wide and then miscontrolled a pinpoint pass from Riise.
But once again Liverpool were punished at the back as Hughes rose unchallenged to head home Kolkka's cross from the left seven minutes after the break.
Riise bent one shot wide and then blasted a free-kick into the stands as Liverpool went in search of a winner.
But the breakthrough finally came when Baros was brought down by Popovic in the 90th minute and guided his penalty past Kiraly.
Liverpool: Kirkland, Josemi (Mellor 79), Hyypia, Carragher,
Traore, Luis Garcia, Alonso, Hamann, Riise (Finnan 62), Kewell,
Baros (Sinama Pongolle 90).
Subs Not Used: Dudek, Biscan.
Goals: Baros 23 pen, 45, 90 pen.
Crystal Palace: Kiraly, Leigertwood, Popovic, Boyce, Granville,
Routledge (Lakis 65), Watson, Riihilahti (Soares 76), Hughes,
Subs Not Used: Speroni, Hudson, Andrews.
Booked: Kolkka, Hughes, Kiraly.
Goals: Kolkka 44, Hughes 52.
Ref: P Dowd (Staffordshire).