St Mirren manager Jim Goodwin hailed Joe Shaughnessy's determination to get their crucial goal against Partick Thistle after the defender's last-gasp strike.
The centre-back netted in the fifth minute of stoppage-time to seal a 2-0 victory which put the Buddies among the seeded teams in the draw for the second round of the Premier Sports Cup.
They were later handed a tricky trip to Livingston, the team that beat them in the semi-finals last season, but they avoided the European qualifiers, who enter after the group stage.
St Mirren would have needed to lose by three goals against the Jags to crash out but a two-goal win ultimately saw them top their group and move their record ahead of Hearts on goals scored, and Dundee United on away goals scored.
Goodwin told St Mirren TV: "We told the players the importance of the goals-scored column. We left it very late, we were all getting a little bit frustrated on the sideline because we knew the importance of the second goal.
"But full credit to the players for having that determination and willingness to keep going right to the last kick of the ball.
"Joe Shaughnessy has sprinted 60-70 yards to join in with the attack to get the all-important second goal. So I'm really, really pleased for him."
Jamie McGrath's 25th-minute penalty put St Mirren on course to top the group but the Jags responded and Jak Alnwick made saves from Brian Graham and Stuart Bannigan before the break.
The hosts dominated after the interval. McGrath's shot skimmed the top of the bar before Curtis Main missed a couple of decent chances and Jay Henderson shot straight at the goalkeeper.
Main headed wide from close range with time running out but skipper Shaughnessy found himself in the six-yard box moments later to tap in Lee Erwin's square ball.
Goodwin added: "The first half was a bit more even than I would have liked but there were plenty of positives. Some really good balls into the box from wide areas, Henderson and (Scott) Tanser were excellent all afternoon.
"And we were getting on the end of things. Main was really unlucky and could have had a couple. The fact we are creating opportunities is pleasing for me. In the second half I thought we could have had three or four.
"All in all a very pleasing afternoon and it's job done. The second goal means we are among the seeded teams and we avoid Celtic and Rangers, which is what everyone wants to do at this stage of the competition."
No Data Analysis info