Labour held the Penistone West Ward in the Barnsley council by-election caused by the death of Coun Peter Starling in May.
In a 25.7pc turnout,  David Griffin beat Conservative Andrew Millner by 53 votes.
Coun Griffin, who lives in Silkstone Common, said planned housing development in the area presented a difficult balancing act with a need for housing and a shortage of school places. “A lot of people have been saying it is difficult to get their children in the primary school nearest them. That’s very much an issue if housing is going to increase,” he said
David Griffin (Lab)        772
Andrew Millner (C)        719
David Wood (UKIP)       662
Steve Webber (Ind)        348