St Johnstone have been drawn against Betfred Cup holders Celtic in the quarter-finals.
The Parkhead side have won the competitions in three of the last four years – the last two being part of back-to-back trebles.
Saints earned their place in the last eight with a 4-2 extra-time victory against Queen of the South.
Ayr United, who dumped Dundee out of the cup at Dens Park, will get a big pay day on the back of their trip to Ibrox.
Full draw –
Rangers v Ayr United
St Johnstone v Celtic
Hearts v Motherwell
Hibs or Ross County v Aberdeen
The ties will be played in the midweek of September 25/26//27.