Hearts and Hibernian have both been given home ties in a fourth round Scottish Cup draw which kept most of the top sides apart.
Hearts have ben paired with fellow Premiership side Livingston at Tynecastle, while Elgin City visit Easter Road to face Hibs. The Edinburgh sides played each other at this stage of the competition last season, with Hearts winning 1-0.
Elsewhere in the draw, two local derbies were pulled from the hat after Ayr United were paired away to Ayrshire neighbours, Auchinleck Talbot, while Dunfermline Athletic travel to Kirkcaldy to take on Raith Rovers. Holders Celtic, meanwhile, host Airdrie and Rangers face off away to League Two Cowdenbeath.
Stenhousemuir, who knocked rivals Falkirk out of the cup, were awarded with a trip to Pittodrie to play Aberdeen. The Ochilview side produced one of the biggest ever shocks in the tournament in 1995 when they dispatched the Dons from the competition to reach the quarter finals.
There are only two all-Premiership fixtures, with St Johnstone hosting Hamilton the only other top tier encounter.
The full draw is:
Cowdenbeath v Rangers
East Fife v Greenock Morton or Peterhead
Auchinleck Talbot v Ayr United
St Mirren v Alloa Athletic
Edinburgh City or Inverness CT v East Kilbride
Hibernian v Elgin City
Celtic v Airdrieonians
Heart of Midlothian v Livingston
Aberdeen v Stenhousemuir
St Johnstone v Hamilton Academical
Dundee v Queen of the South
Motherwell v Ross County
Raith Rovers v Dunfermline Athletic
Montrose or Annan Athletic v Dundee United
Kilmarnock v Forfar Athletic
Partick Thistle v Stranraer
Ties will be played the weekend of 19th January.