Labour’s Mary Lockhart won The Lochs by-election which was prompted by the resignation of Willie Clarke, known as the last elected communist councillor in the UK.
Labour’s Louise McPhater won the Irvine West by-election earlier this month which was sparked by SNP councillor Ruth Maguire’s election as an MSP.
First Minister Nicola Sturgeon’s father, Robin, unsuccessfully contested the seat.
The loss of Irvine West saw the SNP leader’s mother quit as provost of North Ayrshire Council as the authority’s SNP group resigned control of the administration.
Mary Lockhart said: “We won a by-election recently, in Ayr I think, and now tonight and that shows that our policies and membership are still connecting with people.
“We are working for people and they are recognising that.
“The tide is turning for Labour.”
Mr Clarke, 81, retired in June owing to ill health after serving as a councillor since 1973. He was awarded the Freedom of Fife last month.
He was originally a member of the Communist Party of Great Britain and later the Communist Party of Scotland but in more recent years had been sitting as an independent.
The by-election in The Lochs ward of Fife Council was contested unsuccessfully by a candidate for the Communist Party of Britain, which emerged from a CPGB split in the 1980s.
The Lochs by-election results:
Thomas Kirby (Communist Party of Britain) – 86
Mary Lockhart (Labour) – 1,318
Malcolm McDonald (Conservative) – 270
Lea McLelland (SNP) – 1,079
Bradford Oliver (Greens) – 45