Gregor Fotheringham rescued the hosts twice in the space of a minute in the early stages as he threw himself in front of a Jake Pickard drive and then headed the ball away just as Grant Anderson looked set to net.
The Doonhamers came close on 23 minutes with a drive from new recruit Steven Rigg that crept just inches past the post, but the Dumfries men deservedly got their noses in front on 26 minutes.
Jamie Hamill released Anderson on the right and the former Raith Rovers winger sent over a driven cross that Pickard turned in from four yards.
They were two up eight minutes later when a corner from Hamill was met by Andy Dowie and the defender sent a strong header through a sea of bodies.
Anderson created a great chance for Rigg eight minutes into the second half when he raced up the right wing and cut the ball back however the striker sent his effort wide.
Referee Alan Newlands surprised everyone on the hour mark when he penalised the home side’s Bryan Wharton for a high challenge on Anderson with a free kick after the Queen of the South man looked to be downed in the box.
The visitors had one last chance to make their margin of victory more emphatic, however substitute Derek Lyle turned his effort from eight yards wide.