Liverpool stuttered into the quarter-finals of the Champions League with a 2-1 aggregate win over Inter Milan after suffering a 1-0 loss to the Italian side, who were reduced to 10 men, at Anfield on Tuesday.
After a cagey first half, a superb drive into the top corner from Lautaro Martinez in the 62nd minute put Inter ahead on the night.
But just when they looked capable of springing a surprise, the visitors found themselves down a man after Alexis Sanchez was dismissed for a second yellow card after catching Liverpool midfielder Fabinho.
It was a harsh decision against Sanchez, who had won the ball but caught the Brazilian with his follow through and Inter's bench furiously protested.
The dismissal killed Inter's momentum with Liverpool never looking in danger of conceding again.
"Lautaro's goal had hit Liverpool, but Sanchez's expulsion influenced the last half hour of play," said Inter coach Simone Inzaghi ruefully.
"A victory at Anfield it's nice, but it's useless for the qualification," he added.
After their 2-0 loss at the San Siro, Inzaghi's Inter came to Anfield knowing that they needed to find the perfect balance of defensive security and clinical finishing and they began in confident fashion.
Inter's shape was compact and their movement clever while Liverpool struggled to get into their normal rhythm, perhaps wary of over-committing.
Still, it was the home side who came nearest to taking a first-half lead with Joel Matip heading against the bar and then Virgil van Dijk heading wide from a Trent Alexander Arnold corner.
Hakan Calhanoglu forced Liverpool keeper Alisson Becker into action in the 42nd minute and on the stroke of halftime Trent Alexander-Arnold, finding space on the right, flashed a shot just wide.
Liverpool struck the woodwork again after the interval, with Mohamed Salah hitting the post after Inter keeper Samir Handanovic had rushed out to foil Diogo Jota.
But the game truly came alive when Martinez, having just wasted a good opportunity, picked the ball up on Liverpool's right and took a step inside before unleashing an unstoppable drive.
It was a short-lived moment of promise for Inter though, with Sanchez departing soon after, and it was Klopp's men who looked the more likely to add to the scoring.
Salah hit the post for the second time in the game and then substitute Luis Diaz saw a stoppage-time shot cleared off the line by Arturo Vidal.
Although the defeat ended Liverpool's seven-match winning run in the Champions League they achieved their goal of reaching the last eight for the fourth time in the last five seasons.
"The art of football is to lose the right games. I still hate it, but if there's any game we could afford to lose it was tonight," said Klopp.
"Over the two games I think we deserved it. It is fair that we are through against a tough opponent".