Dundee United face a tricky trip north in the fifth round of the Scottish Cup.
The Tangerines reward for a 2-0 victory over Alloa is an away tie against Aberdeen.
Meanwhile, Dundee will face a home game against Motherwell if they can get the better of Inverness Caledonain Thistle following the 2-2 draw at Dens Park on Saturday.
If St Johnstone can get the better of Albion Rovers in their rearranged fourth round tie, they will face a difficult outing to the capital to face Hearts, who beat city rivals Hibernian 1-0 on Sunday afternoon.
The full fifth round draw is:
Formartine United or Cove Rangers v Livingston or Falkirk
Greenock Morton v Peterhead or Dumbarton
Hearts v Albion Rovers or St Johnstone
Kilmarnock v Brora Rangers
Ayr United v Fraserburgh or Rangers
Aberdeen v Dundee United
Dundee or Inverness Caledonian Thistle v Motherwell