Hearts will meet Celtic at Tynecastle in the fourth round of the Scottish Cup, with five all-Premiership ties also pulled out of the hat.
Scottish Cup holders St Johnstone welcome Ross County, St Mirren entertain Inverness, Dundee take on Aberdeen, Motherwell face Dundee United and Partick Thistle are at home to Hamilton.
Rangers are at home to Kilmarnock.
The ties will be played on the weekend of 29/30 November.
Junior outfit Hurlford United, still in the competition after their 1-1 draw with Stirling Albion, host Raith Rovers if they get through their third round replay.
|Scottish Cup fourth round draw|
|St Johnstone||v||Ross County|
|St Mirren||v||Inverness CT|
|Hurlford Utd or Stirling Albion||v||Raith Rovers|
|Queen of the South||v||Brora Rangers|
|Elgin City or Bo'ness Utd||v||Arbroath|
|Spartans||v||Morton or Airdrieonians|
|Berwick Rangers||v||Albion Rovers|
|Ayr United or Alloa||v||Hibernian|
The winner of the replay between Bo'ness United and Elgin City face a home tie with Arbroath, who saw off junior side Linlithgow Rose at the weekend.
Hibernian visit the winner of the replay between Ayr United and Alloa Athletic.
The draw was carried out at Hampden on Monday afternoon, with holders St Johnstone first out of the hat.
The Perth men won the trophy for the first time in their history last season with a 2-0 triumph over Dundee United at Celtic Park.
Championship leaders Hearts' date with Celtic looks like the tie of the round.
The sides met in the League Cup earlier this season, with Scottish champions Celtic running out 3-0 winners in Glasgow.
And at the same stage of the Scottish Cup last term, Celtic hammered Hearts 7-0 in Edinburgh.