Crystal Palace ensured that Steven Gerrard ended his emotional final Anfield appearance with a defeat.
Crystal Palace spoiled Steven Gerrard's farewell party with a 3-1 Premier League win over Liverpool at Anfield.
Gerrard's final appearance on his home ground before joining the LA Galaxy dominated the pre-match buildup and Adam Lallana's 26th-minute opener meant the 34-year-old's 354th competitive Anfield outing was all set up to end in success.
But Palace ignored the script, as the brilliant Yannick Bolasie and Jason Puncheon led the charge against a shaky Liverpool back line, the latter equalizing with a free kick late in the first half.
Visiting substitute Wilfried Zaha scored 22 seconds after his 59th-minute introduction and then won a late penalty that Glenn Murray converted on the rebound, as Alan Pardew's team completed a deserved league double over the Merseyside outfit.
The 120th Premier League goal Gerrard and his adoring faithful craved proved elusive and Liverpool now heads into the final weekend of the season yet to secure UEFA Europa League qualification.
Gerrard was afforded a guard of honor by the players from both sides and a thunderous reception from the Anfield crowd as he entered the field separately with his daughters, Lilly-Ella, Lexie and Lourdes.
The pre-match festivities, capped by a spine-tingling rendition of "You'll Never Walk Alone," gave way to an initially subdued contest with a testimonial feel, as neither team created any chances of note during the opening exchanges.
Palace winger Bolasie almost scored the opening goal after 23 minutes when his speculative shot spun wide off Liverpool defender Martin Skrtel with goalkeeper Simon Mignolet beaten.
Ex-Liverpool defender Martin Kelly featured as one of five changes to an experimental Palace lineup and he had an unwitting hand in his former team’s opener — playing a dreadful pass back toward fellow center back Scott Dann for Lallana to intercept, charge through on goal and finish emphatically.
Palace should have been level in the 29th minute when Bolasie outmuscled Dejan Lovren to send in a low cross from the right. Emre Can could only clear as far as Joe Ledley, who blazed a shot wastefully over.
Mignolet got down well to keep out a deflected strike from Puncheon and the same player gave the Londoners the equalizer they deserved two minutes before halftime.
Can was booked for bringing Bolasie down in full flight on the edge of the box and Puncheon left Mignolet red-faced by whipping a fine left-footed free kick across the goalkeeper and into his side of the net.
Liverpool wing back Jordon Ibe drove a shot into the side netting after 49 minutes after a strong start to the second half from Palace.
Jordan Henderson also had an effort deflected wide but the visitors continued to attack with the greater authority and Zaha's instant impact put them ahead.
Bolasie was again instrumental, cutting the ball back across the 6-yard box for his fellow attacker to score with his first touch.
Gerrard finally enjoyed a sight of goal in the 64th minute, arrowing a drive toward the bottom corner that Julian Speroni saved. Once more, Palace responded and Bolasie turned inside Skrtel to rattle a shot against the crossbar.
The fairytale ending ultimately proved beyond Gerrard, with Zaha winning a 91st-minute penalty — although fellow substitute Lucas Leiva's foul appeared to be fractionally outside the area.
Murray, another substitute who had already struck the post, fired home after Mignolet had saved his initial spot kick before Anfield rose to acclaim its hero at full time.