Defending champions Liverpool reached the Champions League last 16 as Group E winners thanks to two second-half goals against Red Bull Salzburg.
The Reds, who needed at least a point to progress, were on the ropes at times against attacking opposition.
But from the moment Naby Keita headed in Sadio Mane’s cross, there was only going to be one winner.
Mohamed Salah clinched victory 100 seconds later with an excellent finish from a tight angle.
Jurgen Klopp’s side needed the three points to top the group after Napoli beat Genk 4-0.
The Reds will discover their Champions League last-16 opponents in Monday’s draw in Nyon, Switzerland (11:00 GMT). Real and Atletico Madrid are both possible opponents.
Salzburg, who had scored 87 goals in 24 games before this, drop into the Europa League last 32. Their 19-year-old striker Erling Braut Haaland had chances to score but failed to become the first player to ever score in his first six Champions League appearances.
Reds comfortable winners… eventually
Liverpool had hoped to have sealed their last-16 place before the final group game – but they came to Austria needing a point against a side who pushed them all the way in a 4-3 thriller at Anfield.
Salzburg started at an electric pace, with Virgil van Dijk having to stop Haaland from having a one-on-one with Alisson after 15 seconds.
There were nine shots on target before the break – the most in the first half of a Champions League match without there being a goal since Schalke v Manchester United in April 2004.
Alisson was needed to make six saves in the first half, although Liverpool arguably had the best chance when Salah shot wide completely unmarked from close range.
The Egyptian also fired over the bar from eight yards after the restart.
Two shaky moments from Salzburg keeper Cican Stankovic eventually settled the game. He rushed off his line to try to take the ball off Mane, who was able to cross for Keita to head into an empty net – both former Salzburg players.
And less than two minutes later he again left his goal unguarded, with Salah going round him before somehow finding the net with his right foot from a tight angle outside the box – a chance much harder than the ones he missed.
They never looked back after that and kept a second clean sheet in a row, having conceded in each of the 13 matches before that.
End of the party for Salzburg
Salzburg were one of the stories of the group stage, with 16 goals in their opening five games – more than the two teams who finish above them. Only two teams – Bayern Munich and Tottenham in Group B – in the tournament have scored more.
In fact 19-year-old Haaland, with eight goals, has outscored 17 teams including Barcelona, Borussia Dortmund, and Atletico Madrid.
Needing to win, they had chances in a frantic start – which could have seen the game play out very differently – with the lively Hwang Hee-chan and Takumi Minamino having shots saved by Alisson in quick succession.
But only three teams have conceded more goals in the group stages than the 13 Salzburg have let in and their race was run after the two quick-fire Liverpool goals,
Norway striker Haaland was replaced in the second half, having only had three shots and 23 touches – although he has still scored 28 goals in 22 games this season.
The Champions League’s loss is the Europa League’s gain, with the Austrian champions moving into that tournament. Although Haaland could be back if he joins one of the many Champions League clubs he is being linked to next month.