Aberdeen will face St Mirren in the Scottish League Cup last 16 knockout stages at Pittodrie.
The draw was made at Tynecastle following Hearts 5-0 win against Caley Thistle on Sunday.
The last 16 ties are due to be played on the weekend of 18 and 19th August 2018.
The draw in full:
- Livingston v Motherwell
- Dundee v Ayr Utd
- Dunfermline v Hearts
- Kilmarnock v The Rangers
- Aberdeen v St Mirren
- Partick Thistle v Celtic
- Hibernian v Ross County
- Queen of the South v St Johnstone