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 24 or 25 February. The first leg will be on either 17 or 18 February.
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 (above) 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, with the game live on RTÉ2 and RTÉ Player on 18 February.
Atalanta will take on Borussia Dortmund, Bayer Leverkusen were paired against Olympiacos, Juventus play Galatasaray and Atletico Madrid are up against Club Brugge.

Meanwhile, Celtic will be up against German side Stuttgart for a place in the last 16 of the Europa League.
Martin O'Neill’s (above, r) men finished 21st in the league phase and are set to be at home for the first leg.
Celtic have met Stuttgart before, beating them 5-4 on aggregate in the last 16 of the UEFA Cup back in 2003, en route to the final under O’Neill.
The team that beat them in that final, Porto, are one of two potential last-16 opponents this season, with the other also from Portugal – Braga.
The first legs will be played on 19 February, with the return matches taking place on 26 February.
Nottingham Forest have been drawn against Turkish side Fenerbahce.
Sean Dyche's men finished 13th in the 36-team league phase which concluded on Thursday and now take on the Istanbul club for a place in the last 16.
Forest are seeded, so are expected to be at home in the second leg, and will play either Danish side Midtjylland or Real Betis of Spain in the last 16 if they make it through.
Robbie Keane's Ferencvaros will meet Ludogorets of Bulgaria.