St Johnstone's Premier Sports Cup progression is out of their hands after defeat by League 1 side Alloa Athletic.
Morgan Neill fired the hosts ahead, but Benji Kimpioka replied almost instantly with his third goal in three games for the Scottish Premiership side.
But 18-year-old defender Aaron Essel was then sent off for the Saints for violent conduct and Luke Rankin's rapid double restored the Wasps lead.
Jack Sanders pulled one back in stoppage time for Craig Levein's side, but the defeat leaves them third in Group F and requiring a win against East Fife on Saturday and hoping Greenock Morton defeat Alloa in order to top the group.
The League 2 Fifers sit one point ahead of Saints - and one behind Alloa - after beating Highland League visitors Brechin City 4-0.