Toyosi Olusanya's 95th minute goal gave St Mirren a dramatic late win at Cowdenbeath and kept the Buddies hopes of topping Group H alive.
Saints created a host of chances, but couldn't find a way past Cowdenbeath goalkeeper Craig Hepburn until deep into stoppage time when Olusanya followed up on a save from the Blue Brazil stopper and slammed into the net.
Stav Nahmani was given his first start after scoring a brace on his debut in Saturday's 4-0 win against Arbroath. Stephen Robinson was also able to welcome Keanu Baccus into the starting line-up for his first appearance of the new season, while Richard Taylor came in with Mark O'Hara suspended, Greg Kiltie injured and Olusanya dropped to the bench.
Saints had controlled the opening half but had little to show for it. Nahmani had a close-range header blocked early into the match before seeing a tame effort held by Hepburn on 28 minutes.
The manager made two changes at the interval with Alex Greive and Lewis Jamieson introduced in place of Baccus and Nahmani.
Scott Tanser had a good chance to put us ahead on 52 minutes when the ball fell nicely inside the area, but the defender screwed the effort wide.
Three minutes later it was Caolan Boyd-Munce who came closest to breaking the deadlock with a powerful drive from distance. Hepburn was down quickly to push away the Northern Irishman's strike.
The goalkeeper made another good save with 20 minutes remaining to deny Greive. The New Zealand forward was quickest to react to Boyd-Munce's cross, but the Blue Brazil goalkeeper spread himself well to keep it goalless. Five minutes later it was Jamieson who the ball fell for kindly, but he struck straight at the goalkeeper.
Hepburn - who was named as Cowdenbeath's official man of the match - again foiled Saints with less than five minutes remaining. The Buddies won a free-kick in a good area around 25 yards from goal. Strain curled low towards the right-hand corner, but Hepburn was down well to save.
Cowdenbeath were reduced to 10 men in the final minute when Kevin Smith was given his marching orders after a second yellow card for a foul on Luke Kenny. It looked like it would be Saints' night when another free-kick opportunity for Strain in stoppage time saw the Australian's effort tipped onto the bar with Saints unable to force home the loose ball.
But the Buddies were able to make the man advantage count when Olusanya's reacted quickest to Hepburn's save from Jamieson's strike to slam into the net and give us three points.
It sets up Saints up for Saturday's clash against Forfar Athletic at The SMiSA Stadium. The Buddies know a win would be enough to secure top spot and a place in the last 16 of the Viaplay Cup.
Toyosi Olusanya celebrates his winner with Alex Greive (Image: Craig Brown)
Full-Time: Cowdenbeath 0-1 St Mirren
St Mirren: Hemming, Fraser (c), Dunne (Kenny 78), R.Taylor (Olusanya 63), Strain, Baccus (Greive 46), Gogic, Boyd-Munce, Tanser, Mandron, Nahmani (Jamieson 46)
Subs Not Used: Urminsky, Sutherland, Penman, Offord
Cowdenbeath: Hepburn, Walker, Rodden, Jordan, Hill (Duncan 67), McNab, Butterworth (Jack 67), McDonald (Berry 71), MacPherson (Smith 79), Chalmers, Docherty (Tait 79)
Subs Not Used: Blair, Murray
Referee: Ross Hardie
Assistant Referee: David McGeachie
Assistant Referee: Gordon Crawford
Attendance: 859