Christian Benteke's 95th-minute penalty handed 10-man Liverpool a dramatic late 2-1 win away at Crystal Palace as they recorded three consecutive Barclays Premier League victories for the first time in over a year on Sunday afternoon.
Liverpool failed to even muster a shot on target in the first-half as Palace went the closer of the two teams to scoring, Emmanuel Adebayor's early header rebounding off the crossbar as they showed plenty of threat.
But just minutes into the second-half, the Reds' resistance was too easily broken as Joe Ledley drilled into the bottom corner after lacklustre defending at a corner.
When James Milner was dismissed for a second yellow card offence, it looked as though Palace would see out the rest of the game comfortably but stand-in goalkeeper McCarthy threw away Palace's lead, passing it straight to Roberto Firmino who confidently despatched to make it 1-1.
After pushing for a winner in the final stages, substitute Benteke went down under a challenge from Damien Delaney inside the box with just seconds left and after some indecision, Andre Marriner pointed to the spot.
Benteke, who had only come on off the bench 10 minutes earlier, stepped up to the spot, stuttered his run up and sent McCarthy the wrong way for a priceless three points at Selhurst Park for the visitors that keeps their slim hopes of a top-four finish alive.
Plenty of early attacking in open end-to-end game
Both sides made a handful of changes from their games in midweek, Jürgen Klopp bringing both Mamadou Sakho and Alberto Moreno into the Liverpool defence with Kolo Touré and Nathaniel Clyne rested.
With perhaps one eye cast towards their UEFA Europa League last 16 first leg clash with Manchester United on Thursday evening, Philippe Coutinho and Daniel Sturridge both started from the bench, as they did for the 3-0 win over Manchester City on Wednesday.
Whilst in-form striker Connor Wickham, who had scored four goals in his last two games, missed out through injury, Emmanuel Adebayor took his place up top with Alex McCarthy replacing first-choice shotstopper Wayne Hennessey in goal.
Despite Palace coming into the game as the worst form team in England, failing to win in any of their league games in the current calendar year, they held no fear against a team whom they had not lost to since October 2013.
Their attacking intent was obvious from the outset as Wilfried Zaha and Yannick Bolasie added dangerous pace and width on either flank, and it was almost from their quick and direct wide outlets that Palace found the opening goal.
Adebayor flicked a ball into the path of Bolasie, who burst through into space in the centre, but goalkeeper Simon Mignolet - celebrating his 28th birthday - was quick off his line to deny the stretching winger's effort at close-range.
Despite the home side's pressure, Liverpool enjoyed good spells of possession and Jordan Henderson's powerful strike on the edge of the box only saw him denied by a brave block.
Adebayor spurns chance to put Palace ahead early on
Palace wasted an excellent chance to break the deadlock after 10 minutes when Adebayor - who tested Mignolet at his near post just seconds earlier - leapt beyond Dejan Lovren at the near post to meet Pape Souare's cross from the left, but he could only cannon his header from six yards out off the crossbar.
With Palace targeting Liverpool's right side, and in particular the channel of Dejan Lovren and Jon Flanagan, they continued to look the more likely team to open the scoring and Yohan Cabaye soon went close from range. Divock Origi's miscontrolled pass set Zaha free and he slipped a through ball in for Cabaye, who looked to curl a 20-yard shot inside the post, but it could only find the side-netting.
But the Reds still had chances of their own, Origi - who was impressive with his hold-up play to bring his teammates into the game - seeing his dropping strike dip just over McCarthy's crossbar and on to the top of the net.
Minutes later, James Milner's nicely weighted free-kick looked destined to trouble McCarthy - before a block sent it out for a corner-kick, which Liverpool created nothing from as their set-piece woes continued.
Despite enjoying as much as 60% possession, Palace fashioned the better chances throughout the remainder of the opening 45 minutes and Mignolet was called to make another good save from Scott Dann's header at a Cabaye free-kick.
Although McCarthy was untested throughout the first-half, Klopp decided against introducing any of his side's attacking talent off the bench at the break as he kept faith with his starting side.
But, as a result, it was Palace who looked the more threatening and persistent as Bolasie continually caused problems. They finally ended their wait for an opening goal through Joe Ledley at a corner, as he scored his first goal in over a year, and his first at Selhurst since November 2014 - also against Liverpool.
Ledley strike puts Palace ahead after the interval
A corner was sloppily defended, opportunities to clear their lines twice wasted, and the ball fell kindly to Ledley in space in the area, and he drove a powerful strike beyond Mignolet and into the bottom corner to the delight of the home supporters.
That played right into the hands of Palace as Liverpool continued to dominate in possession but struggled with their final ball, Firmino seeing shots blocked and deflected wide in quick succession around the hour mark.
Klopp finally opted to bring Coutinho on with half-an-hour remaining, replacing Flanagan with one of the midfielders expected to drop into the back-four - but those tactical changes were scrapped inside a minute after Milner picked up a second yellow card.
Having already gone in late on Cabaye just before the break for his first caution, the experienced midfielder recklessly brought down Zaha outside the Palace forward's own box and referee Marriner gave Milner his marching orders, to leave the visitors with a mountain to climb.
That meant Can dropped into central defence with Lovren shunted out to right-back as Klopp had to reshuffle his side, but they at least looked more potent in the final third with Coutinho on the pitch.
Although it was a harmless shot, McCarthy was finally forced into his first save on 65 minutes as Firmino collected the ball from Coutinho and hit a speculative strike from distance - but it was straight at the goalkeeper to give him a comfortable save.
The Reds' link-up immediately improved and once again Firmino was involved, cutting inside from the right and slipping a weighted pass into Lallana making a run towards the byline. He squared it to Origi at the near post, but he couldn't beat Delaney to it in order to steer it goalwards.
Late Liverpool revival rewards them the three points
But Liverpool's revival was soon rewarded as a horrific error from McCarthy invited the away side back in to the game. The goalkeeper, filling in for the absent Hennessey, lost his footing from a backpass, gifting it straight to Firmino and the Brazilian kept his composure and slotted beyond the 'keeper to level it up with his eight of the season in all competitions.
Liverpool pressed and pressed for the victory late on and came agonisingly close when Alberto Moreno's emphatic strike from distance came back off the post, before Klopp appeared to look at settling for the point.
Despite bringing on Benteke for Origi minutes earlier, the German replaced goalscorer Firmino with centre-back Kolo Touré as a nervy finale looked destined to see both sides share the points - although Benteke's shot forced a good save from McCarthy, who parried it wide.
But with just seconds left of the four minutes stoppage-time, Benteke drove into the box and went to ground after colliding with Delaney's knee, before Marriner eventually awarded a penalty.
The Belgian rose to his feet to coolly send the 'keeper the wrong way and hand his side a much-welcome victory in South London, lifting them into seventh and five points off fourth with a game in hand.