Dundee will play Aberdeen at home in the Betfred Cup last 16 after the draw was made at Dens Park.
The Dark Blues topped Group D thanks to their 1-0 home win over Inverness Caley Thistle – new boy Danny Johnson’s grabbed the only goal – and their reward was a clash against the Dons in the next round.
East Fife were rewarded for their Group A heroics with a glamour tie against Rangers at Bayview, while Forfar take on Livingston at Station Park.
Dunfermline got the toughest task of all as they were handed a trip to Celtic.
The ties are to be played on thre weekend of August 17 and 18.