Newcastle will take on Qarabag of Azerbaijan over two legs for a place in the Champions League last 16.
The Magpies finished 12th in the league phase to miss out on an automatic last-16 berth, but will fancy their chances of beating Qarabag in the knockout play-off round.
Qarabag were hammered 6-0 by Liverpool in the last round of the league phase on Wednesday, but they did manage a 2-2 draw at home to Chelsea on matchday four.
Eddie Howe’s men will face either Chelsea or Barcelona should they make it to the last 16.
Newcastle were seeded, so should be at home in the second leg on February 24 or 25. The first leg will be on either February 17 or 18.
The play-off round draw also included an instant rematch between Real Madrid and Benfica, who met in a dramatic league-phase match on Wednesday.
A header eight minutes into second-half stoppage time by Benfica goalkeeper Anatoliy Trubin was enough for the Lisbon club to reach the play-off round, while Real’s failure to win meant they missed out on an automatic last-16 place.
Benfica have now won three of the clubs’ previous four European meetings, including the 1962 European Cup final, and it will be another chance for former Real coach Jose Mourinho to get one over on his old club, the 15-time champions of Europe.
Holders Paris St Germain face an all-French tie against Monaco. Bodo/Glimt of Norway, who beat Manchester City 3-1 in the penultimate league phase round, were drawn against Inter Milan.
Atalanta will take on Borussia Dortmund, Bayer Leverkusen were paired against Olympiacos, Juventus play Galatasaray and Atletico Madrid are up against Club Brugge.
Borussia Dortmund v AtalantaÂ
Olympiakos v Bayer LeverkusenÂ
Galatasaray v JuventusÂ
Club Brugge v Atletico MadridÂ
Monaco v PSGÂ
Qarabag v NewcastleÂ
Benfica v Real MadridÂ
Bodo/Glimt v Inter
The draw that will determine the last-16, quarter-finals, semi-finals and final will take place on February 27.