Rangers will face Malmo in the Champions League qualifiers after the Swedes saw off HJK Helsinki.
Malmo secured a 2-2 second-leg draw in the Finnish capital to go through 4-3 on aggregate.
Rangers will travel to Sweden next week and host Malmo at Ibrox in the second leg of the third qualifying round on August 10.
The Gers, who begin their Champions League journey in the third round of qualifying after winning the Scottish Premiership title, have not made the group stages of Europe's elite competition since 2010.
- Rangers, Celtic receive attendance boost ahead of new season
- Gerrard tired of Morelos transfer talk
- Scottish Premiership 2021/22: View from the stands
They are only four games away from achieving that goal.
Should Rangers beat Malmo over two legs, the Ibrox side would progress to the Champions League play-off match, which is one step away from the group stages.
Rangers ended their pre-season in impressive fashion, coming from behind to beat Real Madrid 2-1 in their final friendly ahead of Saturday's Scottish Premiership opener.
Steven Gerrard's side looked sharp and dangerous in attack throughout the first half. Summer signing Fashion Sakala carved out numerous chances in the opening 45 minutes, while Ryan Kent hit the underside of the crossbar.
However, it was Real Madrid who went in ahead after Rodrygo's (8) early goal - their only shot of the opening period.
But ten minutes after the break, Sakala finally scored the goal he deserved (55), powering home past Real Madrid goalkeeper Andriy Lunin and introducing himself to the Rangers fans in superb style.
The visitors' evening was about to get worse too. Nacho was sent off for a second yellow (75), with Cedric Itten (77) firing a thunderous effort home two minutes later to seal a deserved victory for Rangers.
It will be an ominous warning for the other Scottish Premiership sides as Rangers begin their title defence on Saturday against Livingston, live on Sky Sports.