Scottish Cup: Derbies in fourth round, Celtic v Brechin, Fraserburgh v Rangers
Holders Celtic will meet Brechin City in the fourth round of the Scottish Cup while Hearts will host Edinburgh rivals Hibernian.
There will also be a Lanarkshire derby between Motherwell and Hamilton Academical.
The third all-Premiership tie will be between Kilmarnock and Ross County.
Last season's runners-up Aberdeen welcome St Mirren and Rangers will visit Fraserburgh, with ties to be played on 20 and 21 January.
Premiership teams enter at the fourth round.
It is the third season in a row that Hearts have met Hibs at home in the tournament, with Hibs winning the past two ties in replays at Easter Road.
No Lowland League or junior sides progressed beyond the third round but four from the Highland League, including three who knocked out League One teams on Saturday, continued in the competition.
As well as Fraserburgh's tie, Formartine United meet fellow Highland League side Cove Rangers and Brora Rangers visit East Fife.
The winner of Montrose's third-round replay against Queen of the South on Tuesday will host Premiership side Partick Thistle.
There are all-Championship ties between Dunfermline Athletic and Greenock Morton and between Livingston and Falkirk.
Ayr host Arbroath, St Johnstone visit Albion Rovers, Dundee take on Inverness Caledonian Thistle, Dumbarton are at Peterhead while Alloa Athletic welcome Dundee United.
Scottish Cup fourth-round draw
Dunfermline Athletic v Greenock Morton
Ayr United v Arbroath
Albion Rovers v St Johnstone
Motherwell v Hamilton Academical
Heart of Midlothian v Hibernian
Livingston v Falkirk
Dundee v Inverness Caledonian Thistle
Formartine United v Cove Rangers
Montrose or Queen of the South v Partick Thistle
Celtic v Brechin City
Peterhead v Dumbarton
East Fife v Brora Rangers
Alloa Athletic v Dundee United
Fraserburgh v Rangers
Aberdeen v St Mirren
Kilmarnock v Ross County
Ties to be played on 20 and 21 January