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 right-footed finish 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's Naby Keita, center, celebrates after scoring his side's opening goal during the group E Champions League soccer match between Salzburg and Liverpool, in Salzburg, Austria, Tuesday, Dec. 10, 2019. (AP PhotoKerstin Joensson)

Liverpool's Naby Keita, center, celebrates after scoring his side's opening goal during the group E Champions League soccer match between Salzburg and Liverpool, in Salzburg, Austria, Tuesday, Dec. 10, 2019. (AP PhotoKerstin Joensson)

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.

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.

Liverpool's manager Jurgen Klopp smiles prior to the group E Champions League soccer match between Salzburg and Liverpool, in Salzburg, Austria, Tuesday, Dec. 10, 2019. (AP PhotoKerstin Joensson)

Liverpool's manager Jurgen Klopp smiles prior to the group E Champions League soccer match between Salzburg and Liverpool, in Salzburg, Austria, Tuesday, Dec. 10, 2019. (AP PhotoKerstin Joensson)

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

Salzburg's Takumi Minamino reacts during the group E Champions League soccer match between Salzburg and Liverpool, in Salzburg, Austria, Tuesday, Dec. 10, 2019. (AP PhotoKerstin Joensson)

Salzburg's Takumi Minamino reacts during the group E Champions League soccer match between Salzburg and Liverpool, in Salzburg, Austria, Tuesday, Dec. 10, 2019. (AP PhotoKerstin Joensson)