The Lowland League champions, however, failed to claim an extra bonus point as they were edged out 5-3 on penalties – substitute Blair Atkinson blazing over from 12 yards.
This was the second time in just three days that the Lowland League champions have taken SPFL opposition to a penalty shoot-out following their 4-3 spot-kick defeat by Dumbarton last Saturday.
First-team coach Derek Riddel, who continues to deputise for Dougie Samuel following the head coach’s recent heart attack, made two changes from the weekend’s goalless stalemate with the Sons, Blair Tolmie and Jason Stevens preferred to Jamie Dishington and Craig Stevenson, who dropped to the bench.
And the visitors sent shockwaves around the Simple Digital Arena as early as the sixth minute, although there was some controversy surrounding the goal.
Former Saint Jack Smith conjured up a neat one-two with David Greenhill, whose intended pass through to team-mate Stevens was initially flagged for offside by the assistant referee on the far side.
However, Greenhill’s pass had clearly taken a deflection off Josh Heaton and, with the Saints rearguard left flat-footed, referee Alan Newlands allowed former Vale of Leithen striker Stevens to race in on Danny Rogers and finish with aplomb.
Alan Stubbs’ men remonstrated with the whistler but their grievances fell on deaf ears.
The goal prompted a reaction from Stubbs with the former Hibs boss becoming more vocal from his technical area. However, despite his players enjoying the lion’s share of possession, everything the Premiership club threw at the Capital side was dealt with by goalkeeper Blair Carswell and his back four.
Saints’ best opportunity of the first half arrived five minutes before the interval. Jeff King was afforded time to pick out James Kellerman just eight yards out. However, the Englishman couldn’t guide his header on target as Carswell watched the No.17’s effort sail wide.
Former Livingston frontman Danny Mullen replaced the ineffective Kellerman for the start of the second half and he immediately went in search of an equaliser.
Spartans almost doubled their lead as Scott Maxwell’s acceleration took him deep into Saints’ half and the former Berwick Rangers man picked out Stevens, whose curling effort had to be tipped away by the stretching right arm of Rogers.
However, Riddel’s side really started to sense a cup upset might be on the cards when Maxwell made it two in the 55th minute.
Smith chased a long ball over the Saints defence and, although Rogers got to the ball first, the keeper could only punch the ball straight into the path of Maxwell, who expertly lobbed the ball into the empty net from 20 yards.
Stubbs’ side halved the deficit just four minutes later as club captain Stephen McGinn lashed the ball past Carswell having replaced Ian McShane just a minute beforehand.
However, that setback appeared to re-energise the Capital side and Smith went close to restoring Spartans’ two-goal advantage as the striker’s right-footed effort was blocked by Rogers following excellent play by Stevens.
Hayden Coulson then rattled Carswell’s crossbar from a free-kick 20 yards out as the Paisley outfit cranked up the pressure.
And Saints breathed a huge sigh of relief when they were awarded a penalty after Ryan Flynn was bundled over in the area by Mikey Herd and Mullen made no mistake in sending Carswell the wrong way from 12 yards.
The match then went to spot-kicks with Atkinson’s miss proving the difference.
Spartans coach Riddel hailed his men, saying: “It felt a whole lot longer than 90 minutes for myself and the guys in the technical area watching that game! We didn’t expect that at all. We came here having come off a really hard game against Dumbarton at the weekend so that was an absolute tremendous effort from everyone. The guys are dead on their feet but it’s a great performance from the whole club.”
St Mirren: Rodgers, P McGinn, Coulson, Heaton, Flynn, Smith, Baird, McShane (S McGinn 57), Kellermann (Mullen 46), Cooke (Stewart 55), King. Subs: Samson, Kpekawa, MacPherson, Erhahon.
Spartans: Carswell, Cennerazzo, Brown, Tolmie, Corbett, Herd, Smith (Girdwood 78), McFarland, Greenhill, Maxwell (Bremner 62), Stevens (Atkinson 70). Subs: Costello, Stevenson, Dawson, Dishington.
Referee: Alan Newlands