Ayr sailed into the Betfred Cup knockout stages in style with a 6-1 victory over Annan.
Ian McCall’s side made it 15 goals and four wins from four games to finish above Ayrshire rivals Kilmarnock in Group E.
They join Falkirk, Motherwell and one of the Dundee sides, who meet on Sunday, as the teams who will join Celtic, Rangers, Aberdeen and St Johnstone among the second-round seeds.
Hamilton, Hibernian and Dunfermline also topped their groups, while Partick Thistle, Ross County and Kilmarnock progressed among the four best runners-up with the losers in the Tayside derby set to complete the qualifiers.
On a day of permutations, Ayr simplified matters by going two ahead at Annan inside three minutes through Ross Docherty and Craig McGuffie. Michael Moffat, Craig Moore, Andy Geggan and Declan McDaid were also on target.
Inverness, Albion Rovers and Morton all secured second in their groups but missed out on qualification, while Peterhead finished on nine points in Group B but will bow out unless there is at least a six-goal win at Dens Park.
Jim McInally’s men followed up their shock win over Hearts with a 3-0 triumph at Elgin through goals from Paul Cairney, David McCraken and Jamie Stevenson, but other results conspired against them, notably Thistle’s late win over Stranraer.
Morton finished on eight points in Group F after Bob McHugh and Robert Thomson hit doubles in a 5-0 win over Edinburgh City.
Albion Rovers briefly threatened to cause a shock in Group G as Alan Trouten followed up his Lanarkshire derby hat-trick with a double in Dumfries but Queen of the South twice levelled through Stephen Dobbie and Darren Brownlie before winning on penalties after a 2-2 draw.
Inverness won 2-1 at Forfar thanks to two goals in two minutes from John Baird and George Oakley, but eight points was not enough. Falkirk had already won Group A and they sealed their seeded status with a 3-0 triumph at Brechin courtesy of goals from Lee Miller, Joe McKee and Alex Harris.
In the only two meaningless games, Raith Rovers edged Fife rivals Cowdenbeath 2-0 thanks to strikes from Lewis Vaughan and Liam Buchanan, while St Mirren duo Cammy Smith and Gavin Reilly netted braces in a 5-0 win over Airdrie.