Highland Football League side Buckie Thistle will travel to Celtic and Dumbarton will host Rangers in the fourth round of the Scottish Cup.
Meanwhile, The Spartans will host Hearts in an Edinburgh derby.
This is the stage that the Scottish Premiership teams come into the competition, with Dundee travelling to Kilmarnock in the only all-Premiership tie.
Celtic beat Inverness Caledonian Thistle in last year’s final to seal a famous treble, although that will not happen this season with Brendan Rodgers’ side eliminated from the Viaplay Cup.
They do, however, have a very favourable fourth-round draw at home to Buckie Thistle.
Craig Conway and Danny Swanson conducted the draw. The fourth round of the Scottish Cup takes place on the weekend of January 20-21, 2024.
This season’s Hampden Park final takes place on Saturday 25 May, 2024.
Scottish Cup fourth-round draw in full:
Ayr Utd vs Kelty Hearts
Kilmarnock vs Dundee
Greenock Morton vs Montrose
Inverness Caledonian Thistle vs Broomhill
St Mirren vs Queen of the South
Brora Rangers vs Cove Rangers
Clyde vs Aberdeen
The Spartans vs Hearts
Bonnyrigg Rose vs Falkirk
Livingston vs Raith Rovers
Motherwell vs Alloa Athletic
Ross County vs Partick Thistle
Celtic vs Buckie Thistle
Forfar Athletic vs Hibs
Airdrieonianians vs St Johnstone
Dumbarton vs Rangers