Aberdeen will face Falkirk at Pittodrie in the fifth round of the Scottish Cup if they defeat Darvel.
The Dons travel to Ayrshire to face the West of Scotland Premier Division champions on Monday night.
The winners of the tie will meet Falkirk, who won 2-1 at Alloa on Saturday.
Aberdeen exited the competition in the fifth round last year with a 2-1 defeat at Motherwell which spelled the end of Stephen Glass’ time in charge of the Dons.
The winner of our #ScottishCup tie with Darvel will face Falkirk at home in the Fifth Round.
The game will be played on the weekend of Saturday 11th February. pic.twitter.com/UlHMo4mwus
— Aberdeen FC (@AberdeenFC) January 22, 2023
Caley Thistle, Cove Rangers and Elgin City were also all in the draw for the last 16 of the competition after their fourth round ties were all postponed due to the wintry weather.
Caley Thistle will travel to Livingston if they defeat Queen’s Park in their rescheduled encounter at Caledonian Stadium on January 31.
Men’s Scottish Cup Fifth Round Draw https://t.co/Qm7BBdjJqb
— Scottish Cup (@ScottishCup) January 22, 2023
Meanwhile, Cove Rangers or Ayr United will host Elgin City or Drumchapel United in the fifth round.
Elgin City and Drumchapel United will try again at Borough Briggs this Tuesday, while Cove’s tie against Ayr has been rearranged for January 31.
Elsewhere, Celtic and Rangers both received home draws with the Hoops meeting St Mirren and Rangers taking on Partick Thistle.
Dundee United and Kilmarnock will meet in an all-Premiership tie while Hamilton’s reward for defeating Ross County was a home match against Hearts.
The ties are due to take place on the weekend of February 11.
Fifth round Scottish Cup draw
Celtic v St Mirren
Cove Rangers or Ayr United v Elgin City or Drumchapel United
Darvel or Aberdeen v Falkirk
Dundee United v Kilmarnock
Hamilton Accies v Hearts
Linlithgow Rose or Raith Rovers v Motherwell
Livingston v Caley Thistle or Queen’s Park
Rangers v Partick Thistle