Rangers have been drawn to face Motherwell in the revamped Scottish League Cup group stage.
Cup holders Ross County will take on Raith Rovers, Alloa Athletic, Montrose and Cove Rangers in Group D.
The 38 SPFL teams not involved in Europe were included, as well as Cove Rangers from the Highland League and Lowland League side East Stirlingshire.
Teams were drawn into eight groups of five, split into north and south, with the first ties on 16 July.
It will be the first time Motherwell have faced Rangers since the Glasgow outfit, who won the Championship title this season, were denied promotion with a play-off final defeat a year ago.
The other sides in Group F are Stranraer, Annan Athletic and East Stirlingshire, who will be involved for the first time as a Lowland League club following their relegation.
Lowland League champions Edinburgh City, who beat Shire in their play-off to win promotion to League Two for the first time, will face Hamilton Academical, St Mirren, Livingston and Ayr United.
Group C features a Fife derby between Dunfermline Athletic and Cowdenbeath, with the other sides being Dundee United, Arbroath and top seeds Inverness Caledonian Thistle.
The revamped competition, renamed the Betfred Cup, will result in the group winners and four best runners-up progressing to the second round.
European representatives Celtic, Aberdeen, Hearts and Hibernian will also join at that stage.
The final will be played at Hampden Park on 27 November.
The first-round groups consist of one top seed, one from the second pot and three unseeded clubs.
Each team will play each other once, with games taking place on 16, 20, 23, 27 and 30 July, subject to live TV matches.
Any game ending in a draw will go straight to penalties, with the winner of the penalty shoot-out awarded a bonus point.
Group A: Dundee, Dumbarton, Peterhead, Forfar Athletic, East Fife
Group B: St Johnstone, Falkirk, Brechin City, Stirling Albion, Elgin City
Group C: Inverness Caledonian Thistle, Dundee United, Dunfermline Athletic, Arbroath, Cowdenbeath
Group D: Ross County (holders) Raith Rovers, Alloa Athletic, Cove Rangers, Montrose
Group E: Partick Thistle, Queen of the South, Stenhousemuir, Queen's Park, Airdrieonians
Group F: Motherwell, Rangers, Stranraer, East Stirlingshire, Annan Athletic
Group G: Hamilton Academical, St Mirren, Edinburgh City, Livingston, Ayr United
Group H: Kilmarnock, Greenock Morton, Berwick Rangers, Albion Rovers, Clyde