Holders Celtic will begin the defence of their Scottish Cup title against Kilmarnock.
All 12 Scottish Premiership clubs enter the competition in the fourth round, with city rivals Dundee being drawn against Dundee United and St Johnstone taking on Motherwell in the three all-top-flight ties.
Philippe Clement’s Rangers have been drawn against one of the five non-SPFL sides – with Highland League outfit Fraserburgh heading to Ibrox after the fifth-tier club beat Annan Athletic 2-0. Highland League leaders Brechin City, meanwhile, will host Hearts.
West of Scotland League leaders Clydebank – who are the joint lowest-ranked club left in the competition – have been rewarded with a trip to face Hibernian. Fellow sixth-tier club Musselburgh Athletic – who top the East of Scotland League – will take on Championship side Hamilton Academical.
Elsewhere, Broxburn Athletic of the Lowland League – Scotland’s fifth tier – will face Ayr United, plus St Mirren are away to Queen of the South, League Two leaders Elgin City welcome Aberdeen and Ross County host Livingston,
The ties will take place on the weekend of January 18-19.
Scottish Cup fourth-round draw in full:
Dumbarton vs Airdrieonians
Cove Rangers vs Forfar Athletic
Dundee vs Dundee United
Dunfermline Athletic vs Stenhousemuir
Falkirk vs Raith Rovers
St Johnstone vs Motherwell
Queen’s Park vs Montrose
Ross County vs Livingston
Hibernian vs Clydebank
Rangers vs Fraserburgh
Brechin City vs Hearts
Queen of the South vs St Mirren
Hamilton Academical vs Musselburgh Athletic
Elgin City vs Aberdeen
Broxburn Athletic vs Ayr United
Celtic vs Kilmarnock