Mohamed Salah's wonderful first-half goal gave Liverpool a 1-0 win over Napoli at Anfield, earning the Reds qualification from Group C of the Champions League at the visitor's expense.
Napoli needed only a draw to qualify but Carlo Ancelotti's men went down to a narrow defeat on Tuesday, Salah once again proving the Liverpool hero.
Following his hat-trick at Bournemouth at the weekend, the Egypt superstar scored the only goal with a magnificent individual effort, beating two Napoli defenders with a stunning turn of pace before finishing from a tight angle.
Napoli had beaten Liverpool 1-0 at home earlier in the group stage to put itself in control of its destiny but the Serie A side could not find a decisive equaliser, Jose Callejon firing over and Alisson brilliantly denying Arkadiusz Milik in the closing stages.
Salah and Marek Hamsik wasted early chances before the first major flashpoint, Virgil van Dijk booked for catching Dries Mertens on the ankle after winning the ball with a strong tackle.
Liverpool had the ball in the net when Trent Alexander-Arnold squared for Sadio Mane to tap in, but the Senegal forward was offside and the goal was disallowed.
It took the lead in the 34th minute, though, Salah spinning away from Mario Rui to run on to James Milner's pass, then brilliantly beyond Kalidou Koulibaly to finish well through David Ospina's legs.
Salah almost added a second shortly after the restart but aiming for Ospina's near post he could only pick out the side netting, with Raul Albiol then heading a corner at the other end straight at Alisson.
Ospina denied both Salah and Mane in a frantic finale, the latter also firing wide a one-on-one chance to clinch the points in added time.
Napoli had chances to snatch qualification but Callejon blazed over Lorenzo Insigne's inviting cross at the back post, while Milik fired straight at Alisson when he should have scored.
What does it mean? Reds escape tight Group C
Group C always looked among the toughest in this season's Champions League, with Napoli the unfortunate side to miss out despite amassing nine points. Liverpool, beaten in the final last season, rode its luck at times but it did enough to edge through behind Paris Saint-Germain.
Salah makes the difference again
A 35th goal in his last 38 Anfield appearances once again showed any suggestions Salah could prove to be a one-season wonder were completely wide of the mark. The former Roma forward has hit 10 Premier League goals this season but the strike against Napoli is easily his most important of the campaign to date.
Ospina error costs Napoli
The departure of former Liverpool goalkeeper Pepe Reina to AC Milan left Napoli with a hole to fill before the season, with Ospina not up to the required standard. His positioning for Salah's strike was particularly poor, the Colombia international appearing to anticipate a low cross but instead leaving clear space at his near post.
Liverpool welcomes Manchester United to Anfield in a blockbuster Premier League clash on Sunday, the same day Napoli travels to Cagliari in Serie A.