Liverpool were taken to extra-time before finally beating League One side Notts County in the Capital One Cup.
The Reds looked to be coasting into the third round when Raheem Sterling beat two defenders to clip in an opener and Daniel Sturridge rifled in a second.
Yoann Arquin headed a goal back for the Magpies and they were level when Adam Coombes tapped in from Arquin's cross.
But Sturridge added his second from a tight angle before Jordan Henderson beat a defender to score from 18 yards.
Liverpool finished the game with 10 men when, with all three substitutes already on the pitch, Kolo Toure was taken off on a stretcher in extra-time.
Defender Aly Cissokho, who joined from Valencia on loan earlier in the month, lasted just nine minutes of his first start for the club when he hobbled off following a challenge from County's Jamal Campbell-Ryce.
By then, Liverpool were already ahead. Sterling, who was named in Roy Hodgson's England squad earlier in the day, cut past two County challenges, before firing beyond keeper Bartosz Bialkowski.
Defender Daniel Agger headed against the post before Sturridge rounded off an incisive passing move with a sharp finish from 12 yards to score in his third successive game of the season.
Captain Steven Gerrard and Toure both hit the woodwork as Liverpool looked likely to progress without too much exertion ahead of Sunday's Premier League derby with rivals Manchester United.
But they were forced to play an extra 30 minutes when the visitors pulled off an unlikely turnaround.
County grabbed a goal back early in the second half when Arquin smashed in a powerful header off the underside of the crossbar, while the Reds lost midfielder Joe Allen, who limped off the pitch.
And the comeback was complete six minutes from the end of normal time when the Martinique international ran past the Liverpool defence before pulling the ball back for Coombes to equalise at the far post.
Early in extra time Toure went down injured but the 10 men restored their lead in the 105th minute when Sturridge's low shot crept under Bialkowski and over the line.
Substitute Henderson wrapped up victory with a clever individual strike late on when he nutmegged County defender Enda Stevens before curling a low effort into the bottom corner.
Liverpool manager Brendan Rodgers:
"I congratulate my men for showing that character and commitment and also Notts County.
"At 2-0 down, it was a great fightback and that will bode well for their season. We have seen before that 2-0 is a dangerous scoreline, but we are glad to get through.
"It was obviously disappointing with Cissokho getting injured so early on - he was distraught coming off as you can imagine.
"Joe Allen we just need to check - he has maybe tweaked his hamstring.
"And Kolo Toure has overstretched his groin, so we need to assess that, which doesn't look so good to be honest."