Holders Celtic face a tough trip to Dingwall in the second round of the Premier Sports Cup.
Ross County were hoping to finish as one of the three best group winners to enter the seeded section of the draw but Aberdeen’s 3-0 win over Raith ended their hopes and Malky Mackay’s team will now host the champions.
The Dons’ win ended Raith’s qualification hopes and ensured Queen of the South were the final team to make the last 16 and Wullie Gibson’s men were handed a trip to Ibrox to face Rangers as a reward.
Aberdeen joined Arbroath and Dundee among the seeds and were handed a long trip south to face Annan, who were the first team to qualify from the groups.
There are three all-cinch Premiership ties in the second round with Hearts hosting Kilmarnock and Dundee United travelling to Livingston.
Motherwell will host Inverness while Partick Thistle stage an all-Championship tie against Arbroath.
Dundee will take on Falkirk at Dens Park with the games due to be played on August 30-31.
The draw took place at Pittodrie after Aberdeen rounded off a perfect Group A campaign which yielded four wins, four clean sheets and 12 goals.
The Dons had already sealed progress but a two-goal victory from the visitors would have seen Raith win the group, while Rovers would have qualified with a draw and a shoot-out success.
An early Bojan Miovski penalty, a long-range strike from Ross McCrorie and a Jonny Hayes goal had the Dons three ahead inside the first minute of the second half.
Second Round Draw
Rangers v Queen of the South
Partick Thistle v Arbroath
Motherwell v Inverness CT
Livingston v Dundee United
Dundee v Falkirk
Annan Athletic v Aberdeen
Hearts v Kilmarnock
Ross County v Celtic
STV News is now on WhatsApp
Get all the latest news from around the countryFollow STV News
Follow STV News on WhatsApp
Scan the QR code on your mobile device for all the latest news from around the country