Spartans displayed tremendous character to defeat a determined Dalbeattie Star team who could not find a way past a resolute visiting defence.
Spartans started positively and after only five minutes a Jack Beesley free-kick from 25 yards hit the base of the post.
The visitors then dominated with Beesley having an effort cleared off the line by Ritchie Maxwell before a Craig Stevenson shot was deflected.
Spartans took the lead midway through the first half when a Stevenson shot squirmed across the six-yard box and Willie Bremner sneaked in at the back post to score.
Spartans’ goalkeeper Kevin Swain was not tested although, early in the second half, both Kevin Sivewright and Alasdair MacKinnon cleared net-bound efforts off the goal-line.
Spartans brought on Kevin Motion and, after Douglas won a crucial header in the penalty box, Motion rushed forward to fire a 16-yard shot high into the roof of the net to seal victory.
Dalbeattie Star: Drysdale, Maxwell, Neill (Ferguson 85), Cameron, Anderson, Wells, Park, Dunglinson, Bell, Sloan, Warren. Subs: Kerr, Muir, Trialist.
Spartans: Swain, Nixon, Cennerazzo, Sivewright, MacKinnon, Stevenson, Beesley (Brown 65), Grant, Douglas (Hunter 83), McLeod (Motion 65), Bremner. Subs: Bruce, Gilpin.