Joe Shaughnessy netted five minutes into stoppage-time to secure St Mirren a place among the seeded teams in the Premier Sports Cup second round.
The Saints skipper's goal made it 2-0 and ensured they bettered Dundee United's record.
Jamie McGrath's first-half penalty had put the Paisley side on course to top the group but they left it late to guarantee themselves a place among the seeds.
Thistle had to win by three goals to leapfrog the Buddies and join Dunfermline in progressing from Group G.
But their task became even tougher when McGrath slotted home a 25th-minute spot-kick after Richard Foster had been adjudged to have brought down Jay Henderson.
The Jags responded and Jak Alnwick made saves from Brian Graham and Stuart Bannigan before the break.
But 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 Henderson shot straight at the goalkeeper.
Main headed wide from close range in stoppage-time but centre-back Shaughnessy found himself in the six-yard box moments later to tap in Lee Erwin's square ball.
Both St Mirren and Dundee United have identical goal difference records of nine for and one against, but Jim Goodwin's side moved ahead courtesy of scoring more away from home.
They join Dundee among the seeds for Sunday evening's draw along with European qualifiers Rangers, Celtic, St Johnstone, Hibernian and Aberdeen.
United need Inverness to take a point at Tynecastle – or restrict Hearts to a 1-0 victory – to prevent Robbie Neilson's side overtaking their record and sealing the final seeded place.