Liverpool will play Hoffenheim in the Champions League play-off round.
The draw sees Liverpool boss Jurgen Klopp return to his native Germany and striker Roberto Firmino take on his former club.
Scottish champions Celtic meet Kazakhstan side Astana, who they beat in the third qualifying round last season.
Liverpool are competing in European football’s premier competition for only the second time in eight seasons after finishing fourth in the Premier League last term.
Klopp will know Hoffenheim well from his time coaching in Germany, but the Bundesliga club will present a difficult obstacle as Liverpool look to reach the Champions League group stage.
Coached by 30-year-old Julian Nagelsmann – the youngest manager in Europe’s top five leagues – Hoffenheim finished fourth in the Bundesliga last season.
Hoffenheim had the second-best defensive record in the division and only champions Bayern Munich suffered fewer defeats.
Celtic’s reward for their third qualifying round victory over Rosenborg of Norway is to once again make the near 8,000-mile round trip to Kazakhstan.
Brendan Rodgers’ side played Astana in the Champions League last season, drawing 1-1 in Kazakhstan before winning the Parkhead return 2-1.
The first legs will be played on August 15 and 16, with the return fixtures on August 22 and 23.
Provided by Press Association