Scottish Cup holders Hearts have been matched against Edinburgh rivals Hibernian in today's fourth-round draw.
Hibs were on the receiving end of a 5-1 thrashing against their local adversaries in last season's final, but will have a chance to exact revenge at Easter Road.
Glasgow giants Celtic and Rangers were kept apart and will both be confident of progressing after being handed home ties.
Neil Lennon's side will host either Inverurie Loco or Arbroath while Rangers take on Elgin City at Ibrox.
Aberdeen will face Motherwell in a clash between Scottish Premier League heavyweights at Pittodrie.
All 16 ties are due to take place on the weekend beginning Saturday, December 1.
Scottish Cup fourth-round draw
Partick Thistle v Dunfermline
Kilmarnock v Queen of the South
Airdrie or Raith v Deveronvale
Turriff United v Albion Rovers or Morton
Livingston v Dundee
Rangers v Elgin City
Forfar or Nairn County v Ayr United
Ross County v Inverness
Celtic v Inverurie or Arbroath
Dumbarton v Hamilton
Cowdenbeath v St Johnstone
Stranraer or Queen's Park v Dundee United
Stenhousemuir or Berwick v Falkirk
St Mirren v Brechin or Bonnyrigg Rose