Rangers have been drawn away to Ayr United in the second round of the Petrofac Training Cup.
The Light Blues, who have yet to win the competition in three attempts, thumped Championship rivals Hibernian 6-2 at Easter Road to set up a meeting with the Honest Men, who comfortably overcame Albion Rovers.
Holders Livingston beat Clyde in the first round and will face James Fowler’s Queen of the South.
St Mirren have been drawn away to Annan, while Falkirk, who beat East Fife 3-1, are at home to Peterhead.
All second round ties are due to be played on August 18 and 19.
Forfar v Dunfermline
Falkirk v Peterhead
Alloa v Elgin
Stenhousemuir v Raith
Annan v St Mirren
Ayr v Rangers
Queen of the South v Livingston
Queen’s Park v Dumbarton