Holders Celtic will travel to Partick Thistle in the fourth round of this season's Scottish Cup.
Neil Lennon's men were handed the short trip across Glasgow to face the Scottish Championship's bottom club, who edged past non-league Penicuik Athletic on Saturday.
Steven Gerrard's Rangers have a home game against League One Stranraer, while at least one non-league club will reach the fifth round after East Kilbride were paired with BSC Glasgow.
Bonnyrigg Rose, who beat League One Montrose on Saturday, get the chance to repeat the feat against Clyde, and Broxburn Athletic travel to Premiership St Mirren.
Aberdeen face Dumbarton, Hearts take on Airdrie and Queen's Park, winners of the trophy 10 times in the 19th century, make the trip to Kilmarnock.
William Hill Scottish Cup fourth round draw:
St Mirren v Broxburn Athletic.
Kilmarnock v Queen's Park.
Hearts v Airdrieonians.
Alloa v Inverness CT.
Livingston v Raith Rovers.
Auchinleck Talbot/Arbroath v Falkirk.
Dundee Utd v Hibernian.
Ayr v Ross County.
Aberdeen v Dumbarton.
Bonnyrigg Rose v Clyde.
St Johnstone v Morton/Brora Rangers.
Hamilton v Edinburgh City.
Partick Thistle v Celtic
East Kilbride v BSC Glasgow.
Dundee v Motherwell.
Rangers v Stranraer.
Ties to be played January 18-19.