Father-of-two Doug Fairbairn, 47, who lives at Torthorwald with his wife Gwyneth, topped the vote in the Annandale North ward.
Mr Fairbairn expressed delight as he was announced as winner following the count at Lockerbie Town Hall on Friday morning.
He attracted 2041 votes in the by-election triggered by the resignation of Labour member Graeme Tait.
Next was SNP candidate Sylvia Moffat with 749 votes; Labour’s Adam Wilson 611 votes and Green candidate Chris Ballance with 152 votes.
There was a turnout of 33.63 per cent.