DUNDEE will host Celtic in the fifth round of the William Hill Scottish Cup while Rangers have been handed a home tie against Raith Rovers.
In another all-Premiership clash, Partick Thistle will take on St Mirren or Inverness Caledonian Thistle while holders St Johnstone travel to Queen of the South.
Hibernian, who edged past Alloa Athletic on Saturday will play Arbroath at Easter Road while giant-killing Spartans, who knocked out Morton in the previous round, have been handed a home tie against either Berwick Rangers or Albion Rovers.
Falkirk will welcome Annan Athletic or Brechin City to the Falkirk Stadium and the winners of the replay between Stranraer and Dunfermline will play Dundee United at home.
The nature of the draw means only four Scottish Premiership teams can advance to the quarter finals while Lowland League outfit Spartans have a chance of making the last eight for the first time in their history.
Ties will be played on the weekend of February 7 / 8 2015.
Draw in full
Dundee v Celtic
Falkirk v Annan Athletic / Brechin City
Hibernian v Arbroath
Partick Thistle v St Mirren or Inverness Caledonian Thistle
Queen of the South v St Johnstone
Rangers v Raith Rovers
Spartans v Berwick Rangers / Albion Rovers
Stranraer / Dunfermline Athletic v Dundee United