Holders Hibs will begin their defence of the William Hill Scottish Cup with a fourth round away clash against either Dumbarton or Bonnyrigg Rose.
The draw at Rugby Park last night handed the Junior outfit a massive incentive when they take on the Sons in their replay at the Cheaper Insurance Direct Stadium next week following Saturday’s 0-0 draw.
Hearts will travel to Championship side Raith Rovers, managed by ex-Jambos boss Gary Locke.
Celtic were drawn away to either Albion Rovers or Queen of the South, while Rangers host Motherwell and Kilmarnock face Hamilton in the only all-Premiership ties.
Spartans, who meet St Mirren in Paisley tomorrow night, would be rewarded with a trip to top-flight Dundee should they shock the Buddies.
SCOTTISH CUP FOURTH-ROUND DRAW
Ross County v Dundee United
St Johnstone v Forres Mechanics or Stenhousemuir
Albion Rovers or Queen of the South v Celtic
Livingston v East Fife or Edinburgh City
Rangers v Motherwell
Aberdeen v Stranraer or East Kilbride
Elgin City v Inverness
Raith Rovers v Hearts
Kilmarnock v Hamilton
Bonnyrigg Rose or Dumbarton v Hibernian
Brechin City or Ayr United v Queen’s Park or Montrose
Partick Thistle v Formartine United or Annan Athletic
Stirling Albion or Wick Academy v Clyde or Arbroath
Alloa Athletic v Dunfermline Athletic
Dundee v St Mirren or Spartans
Beith Juniors or Greenock Morton v Falkirk