Hearts have been handed a home tie against Hibs for the third consecutive year in the fourth round of the Scottish Cup.
Hibs needed a replay to get past Hearts on their way to winning the trophy during the 2015/16 competition, and the all-Edinburgh clash went to a replay again last season, Hibs triumphing 3-1 after a goalless draw in Gorgie.
Elsewhere in the draw, Celtic host Scottish Championship side Brechin City, while Rangers face a trip to Highland League side Fraserburgh.
There were two other all-Premiership ties drawn out of the hat, with Motherwell hosting Hamilton and Kilmarnock playing Ross County.
Partick Thistle will play the winners of tomorrow night’s replay between Montrose and Queen of the South, after the teams played out a goalless draw at Links Park on Saturday.
Dunfermline will play Championship rivals Morton while Livingston and Falkirk meet in the other all-Championship clash.
Aberdeen host St Mirren, St Johnstone face League One side Albion Rovers at Cliftonhill and Brora’s reward for dumping Stranraer out of the cup at the weekend is a trip to Methil to face East Fife.
At least one Highland League side is guaranteed a place in the next round, with Formartine United hosting Cove Rangers.
Dundee face Inverness Caledonian Thistle, Dumbarton travel to Peterhead, Alloa host Dundee United and Arbroath play league rivals Ayr United at Somerset Park.
Scottish Cup fourth round draw, ties to be played weekend of 20/21 January
Dunfermline Athletic v Greenock Morton
Ayr United v Arbroath
Albion Rovers v St Johnstone
Motherwell v Hamilton Academical
Hearts v Hibs
Livingston v Falkirk
Dundee v Inverness Caledonian Thistle
Formartine United v Cove Rangers
Montrose / 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