Aberdeen will start their Scottish Cup campaign with a home game against Edinburgh City.
Gothenburg Great and Evening Express columnist Willie Miller made the draw following Brechin City’s 1-1 third round draw with Darvel at Glebe Park and he handed his old club a fourth round tie against the League Two side.
Ross County face an all-Premiership fourth round tie after being drawn away to Livingston while Caley Thistle will travel to Motherwell if they can beat Morton in next week’s replay.
Cove Rangers can also earn a Premiership trip in the fourth round if they beat Queen of the South in their replay next week with a trip to Easter Road to face Hibernian on offer to the winners.
Junior side Banks O’Dee’s reward for beating East Fife is another home tie. They will welcome Championship side Raith Rovers to Spain Park,
Peterhead will face Lowland League side East Kilbride at Balmoor Stadium. Holders St Johnstone, who won both domestic cup competitions last season, start their defence at either Kelty Hearts or Montrose.
Ties will be played on the weekend of January 22, 2022.
SCOTTISH CUP FOURTH ROUND DRAW – Peterhead v East Kilbride, Clydebank v Annan Athletic, Banks O’Dee v Raith Rovers, Motherwell v Caley Thistle or Greenock Morton, Kelty Hearts or 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 or Queen of the South, Partick Thistle v Airdrie, Auchinleck Talbot v Hearts, Alloa v Celtic, Arbroath v Brechin City or Darvel.