Holders Celtic will face Peterhead in the William Hill Scottish Cup fourth round in January following Tuesday's draw at Hampden.
Celtic, currently second behind Rangers in the Clydesdale Bank Premier League, will meet the Aberdeenshire side, who are currently second bottom of the Irn-Bru Scottish Football League in the tie, which will take place on the weekend of Saturday, January 7 and Sunday, January 8.
Rangers also face an away test on the east coast, with Second Division Arbroath hosting the SPL champions.
The Old Firm rivals were drawn together in the rehearsal, but there was only one all-SPL tie between the 36 clubs involved in the draw when it took place for real.
Inverness will host Dunfermline, while Hearts were drawn to play junior side Auchinleck Talbot and their capital city rivals Hibernian face the tricky prospect of a trip across the Forth to Irn-Bru Division Two leaders Cowdenbeath.
St Johnstone will host Brechin, Dundee United will travel to Airdrie, Kilmarnock will visit Dundee and St Mirren will play Hamilton, who were relegated from the top flight last term.
Aberdeen and Motherwell must wait until this weekend's replays are completed to discover their opponents.
Aberdeen will face a trip to either Stranraer or Forfar, while Motherwell will host Elgin or Queen's Park.
First Division leaders Ross County will play Stenhousemuir, Raith Rovers will meet Morton, Falkirk will take on East Fife and Livingston will play either Ayr or Montrose.
The reward for junior side Culter should they win their replay with Partick is a fourth round clash at home to Thistle's First Division rivals Queen of the South.