Both Spartans and Bonnyrigg Rose will face opponents from the Championship in the third round of the William Hill Scottish Cup.
Spartans travel to St Mirren – the teams met in the tournament back in 2006, with the Buddies winning through after a replay – while Bonnyrigg Rose will host Dumbarton.
If Edinburgh City defeat Forfar in their second round replay, they will be rewarded with a trip to East Fife.
Ties are due to be played on Saturday, November 26.
Full draw: Elgin v Hawick RA; Airdrie v Livingston; Buckie Thistle or Gretna 2008 v Dunfermline; Stirling Albion v Wick Academy; St Mirren v Spartans; Stranraer v East Kilbride; Cumbernauld Colts or Forres Mechanics v Stenhousemuir; East Fife v Edinburgh City or Forfar Athletic; Albion Rovers v Queen of the South; Clyde v Arbroath; Banks O’Dee or Formartine United v Annan Athletic or East Stirlingshire; Beith v Morton; Brechin City v Ayr United; Bonnyrigg Rose v Dumbarton; Peterhead v Alloa; Queen’s Park v Montrose