Blair Henderson scored a late penalty as Spartans squeezed a slender advantage from their cinch League 1 play-off semi-final first leg against Peterhead.
Spartans, in their first season at senior level, had fallen behind after just eight minutes when Peterhead’s Conor O’Keefe burst clear and lobbed goalkeeper Blair Carswell.
But Paul Watson slid home the equaliser from a corner in the 17th minute and Carswell’s heroics kept the Edinburgh side in the tie.
Two saves denied Kieran Shanks in the first half and Carswell also denied Flynn Duffy on the hour mark as Peterhead pressed to no avail.
Henderson held his nerve from the spot four minutes into added time and there was still time for Peterhead to unsuccessfully protest for a penalty of their own.