Hearts and Hibernian will face each other in the William Hill Scottish Cup for the third season running after being paired together in the fourth round.
Hibs will be looking to knock out their Edinburgh rivals for the third year running when they meet at Tynecastle on the weekend of January 20-21.
Rangers have been handed a trip to face Highland League outfit Fraserburgh while Celtic will kick off their defence of the trophy at home to Brechin.
Lanarkshire rivals Motherwell and Hamilton will also face-off at Fir Park while Kilmarnock will welcome Ross County to Rugby Park for another all Ladbrokes Premiership showdown.
Last year's runners-up Aberdeen host Championship high-flyers St Mirren but St Johnstone face a trip to Cliftonhill after being drawn against Albion Rovers.
Dundee take on Inverness while Partick Thistle travel to the winner of Tuesday's replay between Montrose and Queen of the South.
There will also be at least one Highland League outfit in the next round too after Formartine United landed a home tie against Cove Rangers.
The full draw is:
- Dunfermline v Morton
- Ayr v Arbroath
- Albion Rovers v St Johnstone
- Motherwell v Hamilton
- Hearts v Hibernian
- Livingston v Falkirk
- Dundee v Inverness
- Formartine United v Cove Rangers
- Montrose or Queen of the South v Partick Thistle
- Celtic v Brechin
- Peterhead v Dumbarton
- East Fife v Brora Rangers
- Alloa v Dundee United
- Fraserburgh v Rangers
- Aberdeen v St Mirren
- Kilmarnock v Ross County
Related links