Rangers have been drawn with Lyon and Celtic with Bayer Leverkusen in the Europa League group stage.
Steven Gerrard's Premiership champions will also take on Sparta Prague of the Czech Republic and Denmark's Brondby in Group A following Friday's draw.
As well as the Bundesliga side, Celtic face Spain's Real Betis along with Ferencvaros, who knocked them out of Champions League qualifying last term.
It will be the fourth consecutive season both sides have taken part in the group stage of Europe's second club competition.
Rangers were defeated in the last-16 stage by Slavia Prague last time out, while Celtic finished bottom of a section which contained AC Milan, Lille and Sparta.
Aberdeen and St Johnstone, Scotland's other two clubs aiming this week to reach group-stage football, were defeated in the Europa Conference League play-offs by Qarabag and LASK, respectively.
Matchday one is scheduled for 16 September, while the final round of fixtures are played on 9 December.
Celtic manager Ange Postecoglou declared himself "super excited" by the calibre of side in his side's group.
Leverkusen finished sixth in the Bundesliga last season and won their Europa League group before going out against Young Boys in the last 32.
Seville-based Betis also finished sixth in their league, while Hungarian champions Ferencvaros knocked Celtic out of the Champions League qualifiers last season with a 2-1 win at Parkhead on their way to the group stage.
'Attractive, fascinating, but tough'
BBC Scotland chief sports writer Tom English
It's not the competition either of them want to be in, but the Europa League draw has placed Celtic and Rangers in with some interesting opposition.
Celtic will go up against Bayer Leverkusen, so that's a welcome back to Glasgow for Jeremie Frimpong and Mr Wonder Goal himself Patrik Schick. Leverkusen might have sold Leon Bailey and Kai Havertz for megabucks in the last two seasons, but they're still seriously formidable. They just beat Borussia Monchengladbach 4-0.
Real Betis are also in there - a sentimental return to Seville is on the cards for Celtic fans. Ferencvaros complete the group. Bad memories there from last season. Celtic's Champions League exit against the Hungarians was an early portent of the chaos that followed. An attractive but tough group that.
Rangers will play Lyon, who have just sold Memphis Depay to Barcelona and have just bought Xherdan Shaqiri from Liverpool. They have former Celtic players Moussa Dembele and Jason Denayer in their team. Fourth in the French league last season.
That's one difficult challenge and Sparta Prague represent another. They took Celtic to the cleaners twice last season - scoring eight goals and conceding two. Lukas Julis struck five times in those games. They finished second in the Czech league.
Brondby make up the group. Champions of Denmark last season and without a win in eight games so far this season. The whole thing is fascinating.