Berwick Rangers will face Lowland League champions Spartans in the fifth round of the Scottish Cup - if they can overcome Albion Rovers in their replay at Cliftonhill next week.
The draw gives all three clubs a good chance to reach the quarter-finals.
Berwick and Albion drew 1-1 at Shielfield on Saturday, while Spartans produced the shock of the round by coming from behind to knock out League 1 leaders Morton out at Ainslie Park.
In their only previous Scottish Cup meeting, Spartans knocked Berwick out in the first round with a 1-0 win at City Park in November 2005.
FIFTH ROUND DRAW
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
Fifth round ties will be played on the weekend of February 7/8.