Celtic will travel to Alloa and Rangers will host Stirling Albion in the Scottish Cup third round as all twelve Premiership clubs enter the competition.
Holders St Johnstone will begin their defence of the trophy with an away tie against either Kelty Hearts or Montrose as Aberdeen are drawn against League Two side Edinburgh City.
The capital’s big two will also play lower league opposition with Hibs drawn against either Cove Rangers or Queen of the South at Easter Road and Hearts face a trip to Auchinleck Talbot.
There is an all-Premiership tie between Livingston and Ross County, while Motherwell are at home to Inverness or Morton.
There will be plenty of interest in Ayrshire, with Ayr United drawn at home to St Mirren and Dundee United travelling to Kilmarnock, while West of Scotland Premier Division outfit Auchinleck Talbot, conquerors of Championship side Hamilton in the last round, will welcome Hearts.
Clydebank will host Annan Athletic and North Superleague side Banks O’Dee, who beat League One East Fife to reach the fourth round, were rewarded with a home tie against Championship side Raith Rovers.
The draw in full:
Peterhead v East Kilbride
Clydebank v Annan Athletic
Banks O’Dee v Raith Rovers
Motherwell v Inverness/Morton
Kelty Hearts/Montrose v St Johnstone
Livingston v Ross County
Dumbarton v Dundee
Aberdeen v Edinburgh City
Rangers v Stirling Albion
Ayr United v St Mirren
Kilmarnock v Dundee United
Hibernian v Cove Rangers/ Queen of the South
Partick Thistle v Airdrieonians
Auchinleck Talbot v Hearts
Alloa Athletic v Celtic
Arbroath v Brechin City/Darvel