Conservative candidate Gavin Ellis took the top slot in a surprise result for Dunfermline North.
He was elected at the third stage of counting, knocking the SNP’s Ian Ferguson into second place and leaving veteran Labour councillor Helen Law languishing in third.
Mr Ellis, an environmental officer with Edinburgh City Council, said he had a good response on the doors during his campaign and he was excited to get started.
Perhaps not surprisingly, he intends to focus on environmental issues, with bin collections, fly tipping and dog fouling big issues for locals.
Anti-social behaviour is also on his agenda following a number of complaints from constituents.
“During the campaign I’ve been working with local community groups and residents, following up reports from them,” he said.
“That’s why people have voted for me.”
Ian Ferguson, who was only elected 18 months ago following a by-election said he was delighted to be back, while Helen Law said she intended to continue the work she had been doing before the election.
“It seems like it’s a very tough time for Scotland the way the votes have been going,” she said.
“In some ways it was a surprise result but in other ways it’s what the polls were telling us.”