SALZBURG, Austria — Defending champion Liverpool survived some early scares before scoring two goals in as many second-half minutes to beat Salzburg 2-0 and advance to the Champions League knockout stage on Tuesday.

Naby Keita, a former Salzburg player, headed in the opening goal in the 57th minute before Mohamed Salah rounded the goalkeeper and squeezed home a finish with his weaker right foot from an acute angle near the byline.

The Premier League leaders arrived at Stadion Salzburg needing just a draw to advance, although a low-scoring loss would have seen them eliminated and Salzburg go through with the same points total via the head-to-head tiebreaker. Napoli beat Genk 4-0 in a match played concurrently in Italy to finish second in Group E and join Liverpool in the last 16.

Liverpool lived dangerously in the first half, giving up a string of chances to Salzburg as 19-year-old striker sensation Erling Braut Håland — looking to score in his sixth straight game in the group — wasted the best of them.

Salah squandered even better ones at the other end before applying the finishing blow to Salzburg with a stunning second goal, the angle having appeared too acute to find the net after breaking the offside trap.

“We kept saying, ‘The next one, the next one, the next one,’ then he goes and scores from a ridiculous angle,” Liverpool left back Andrew Robertson said. “I don't know how he's got it in from there on his weaker foot.”

Barely a minute earlier, two former Salzburg players had linked up to put Liverpool ahead. Sadio Mane sprung clear down the left and, as goalkeeper Cican Stankovic came out to close down the angle, sent over a cross that Keita nodded in past two sprawling Salzburg defenders near the goal line.

“What a team, what an effort,” Liverpool manager Jurgen Klopp said of Salzburg. "It was a tough game. They started so direct. They did so many smart things.

“In the second half, they couldn't cope with the intensity. We scored two wonderful goals. We could have scored six or seven, which is crazy.”

Liverpool, a six-time European champion, has reached the last two Champions League finals — losing to Real Madrid in 2018 and beating Tottenham in June.

Salzburg drops into the Europa League as the third-placed team in the group.

___

More AP soccer: https://apnews.com/Soccer and https://twitter.com/AP_Sports