Hearts will face either Albion Rovers or St Johnstone at home in the fifth round of the William Hill Scottish Cup.
The Jambos, 1-0 victors over city rivals Hibs at Tynecastle today, will meet the winners of Tuesday’s rearranged fourth-round tie between Rovers and Saints.
Holders Celtic will host Partick Thistle.
Highland League side Brora Rangers were rewarded for their victory over East Fife with a trip to take on Premiership side Kilmarnock.
Ayr will be at home to Fraserburgh or Rangers while last year’s runners-up Aberdeen will host Dundee United.
The winner of the replay between Dundee and Inverness will host Motherwell while Formartine United or Cove Rangers will face Livingston or Falkirk.
The final tie pits Morton against Peterhead or Dumbarton.
Matches will be played on the weekend of February 10 and 11.