Scottish cupe draw: Hearts draw Saints
Scottish FA president George Peat, former Hibs manager John Hughes and ex-Dundee United player Lee Wilkie pulled the names out of the hat, with Hibs being handed a home tie with Second Division outfit Ayr United.
The ties will be played on the weekend of January 8 and 9.
The Scottish FA Cup Fourth-round draw
Aberdeen v East Fife
Dundee Utd v Ross County
Queen of the South v Brechin City or Annan Ath
Montrose v Dunfermline
Morton v Airdrie Utd or Beith
Falkirk v Partick Th
Berwick Rangers v Celtic
East Stirling v Buckie Th
Rangers v Kilmarnock
Hibernian v Ayr Utd
Stenhousemuir or Threave Rovers v Stranraer
Hamilton v Alloa
St Mirren v Peterhead
Inverness v Elgin City
Dundee v Motherwell
Hearts v St Johnstone