Dundee’s reward for beating Aberdeen at the weekend is a home tie against Celtic in the last 16 of the Scottish Cup.
Dundee United will either have the long trip to Stranraer or, closer to home, Dunfermline, while cup holders St Johnstone have also been handed lower league opposition in the fifth round (Queen of the South away).
Raith Rovers will get the chance to repeat their Ramsdens Cup heroics, after being paired with Rangers at Ibrox.
Arbroath are away at Hibs, and if Brechin City defeat Annan in their replay they will travel to Falkirk.
Full draw – Queen of the South v St Johnstone; Rangers v Raith Rovers; Dundee v Celtic; Hibernian v Arbroath; Falkirk v Annan or Brechin City; Stranraer or Dunfermine v Dundee United; Partick Thistle v St Mirren or Inverness Caledonian Thistle; Spartans v Berwick Rangers or Albion Rovers.