Liverpool survived a missed penalty before teenager Trent Alexander-Arnold and a Havard Nordtveit own goal gave it a 2-1 win against Hoffenheim which put it on the brink of a Champions League group stage place on Tuesday.
The English Premier League side had a let-off when their goalkeeper Simon Mignolet saved a weak Andrej Kramaric penalty in the 12th minute of the play-off first leg tie.
Alexander-Arnold, 18, curled a free kick through a gap in the Hoffenheim wall to put Liverpool ahead in the 35th minute and James Milner's shot was deflected in off Nordtveit in the 74th. Mark Uth pulled a late goal back for the Bundesliga side.
Sporting Lisbon was held to a 0-0 draw at home by FCSB, formerly Steaua Bucharest, and CSKA Moscow sneaked a late 1-0 win at Young Boys thanks to a Kasim Nuhu own goal in added time.
The results: Qarabag 1 (Madatov 25) bt FC Copenhagen 0; Sporting 0 drew with Steaua Bucharest 0, Hoffenheim 1 (Uth 87) lost to Liverpool 2 (Arnold 35, Nordtveit 74-og); Young Boys 0 lost to CSKA Moscow 1 (Kasim Adams 91-og); APOEL 2 (De Camargo 2, Aloneftis 10) bt Slavia Prague 0.