After a dramatic day of action in the Betfred Cup there is just one place still up for grabs in the last 16 of the competition.
The group winners are confirmed as Peterhead, St Johnstone, Inverness CT (barring an eight-goal win for Dundee United on Sunday), Alloa Athletic, Partick Thistle, Rangers, Hamilton Accies and Morton.
Motherwell, Ayr United and Queen of the South are through as three of the four best runners-up and will be joined by a team from Group C, with Dundee United and Dunfermline Athletic meeting at Tannadice on Sunday.
The draw takes place live on BT Sport after that game and the eight seeded teams will be European entrants Celtic, Aberdeen, Heart of Midlothian and Hibernian plus the four group winners with the best records - Rangers, Alloa Athletic, Partick Thistle and Morton.
Peterhead pipped East Fife for top spot after coming from 3-1 down against Dumbarton to claim a 3-3 draw. The Blue Toon prevailed 6-5 in an incredible shoot-out that saw nine penalties missed before Nicky Riley converted the decisive kick. Dundee had to settle for third spot despite thrashing Forfar 7-0 at Dens Park, helped by a Greg Stewart double.
St Johnstone cruised to a 4-0 win over Stirling Albion at McDiarmid Park to finish top of the section. Falkirk are runners-up after beating Brechin 2-0 but six points wasn't enough to progress.
Scott Boden hit a hat-trick as Inverness CT booked their place in the next round by hammering Arbroath 7-0 at the Tulloch Caledonian Stadium. They will be joined in the last 16 by Dundee United or Dunfermline, who meet at Tannadice on Sunday - live on BT Sport at 3.00pm.
Greig Spence got the only goal as Alloa beat Raith Rovers 1-0 at Stark's Park to make it four wins out of four. Rovers finished second but go out. Holders Ross County were already eliminated but signed off by beating Cove Rangers 7-0, helped by a Brian Graham hat-trick.
Partick Thistle defeated Queen's Park 2-0 at Firhill with goals from Chris Erskine and Liam Lindsay to finish with a 100% record. They are joined in the next round by Queen of the South, who beat Stenhousemuir 1-0 at Palmerston.
Rangers were already confirmed as group winners and Motherwell's 3-0 victory at Stranraer takes them through in second place. Annan triumphed 2-0 against East Stirlingshire at Ochilview in the other game.
Louis Longridge hit the winner as Hamilton Accies beat Livingston 2-1 at the SuperSeal Stadium to top the group. Ayr United clung on to second place on goal difference as St Mirren became the only team to go out with nine points despite a 3-0 home win over Edinburgh City.
Morton are through as group winners after beating Berwick Rangers 2-0 at Cappielow but Kilmarnock are out after losing 5-3 on penalties following a 0-0 draw against Albion Rovers at Rugby Park.