Andy Webster hailed hero Peter Urminsky after St Mirren colts knocked out Kelty Hearts on penalties.
Michael Tidser’s second-half strike seemed to be taking Kevin Thomson’s men into the second round.
But Josh Jack lashed in a last-minute equaliser to take it to a shoot-out.
And Slovak keeper Urminsky did his part by saving all three of Kelty’s penalties as Saints scored three of theirs.
Buddies boss Webster said: “Big Peter produced some magic for us in the shoot-out to win it.
"He was excellent. He’s not played much football recently but turned out to be the hero on the night.”
But unhappy Kelty manager Thomson admitted Hearts “got what we deserved”.
He added: “Full credit to a young St Mirren team who caused us problems with their energy.
"To a man we weren’t good enough. I changed the team and challenged them but a few of them played their way back out the team.”
Kelty had the first chance of the match and Reis Peggie wasn’t far away with a long-range effort that curled wide.
The young Saints responded with a Dylan Reid shot that Josh Donaldson did well to save before Dean McMaster drove over the top.
Kieran Offord was then unlucky to see his run and shot deflected for a corner.
Robbie McNab should have done better than slam a chance wide and Connor Barron’s effort was blocked by Saints defender Luke Kenny.
Joe Cardle, Kelty’s best player on the night, shot straight at Urminsky.
The away side went in front in 68 minutes. Botti Biabi played in Tidser and he finished well into the corner.
Then Kenny saw his header saved before Jack rattled in to take the tie to penalties.