The SNP have taken a seat from the Conservatives in a by-election in Fife.
Mr Glen took first place with 1,526 votes on first choice preference.
Conservative candidate Chloe Dodds was second with 1,142 votes, and the Liberal Democrats' Aude Boubaker-Calder third on 1,050. Labour candidate Michael Boyd was pushed into fourth position on 621.
The number of registered voters for Dunfermline Central was 15,598, with turnout of just 29.5% (4,601 votes).
After his win, Mr Glen said: “As a new councillor, I will need to get up to speed very quickly, but I intend to do that immediately, and with the support and help of my fellow SNP councillors and become as active as I possibly can.
“It’s truly an honour to represent Dunfermline as a historic city, the ancient capital of Scotland. I pledge to represent all of the residents of the ward as effectively as I can, and to represent all the diverse communities we have.”
Meanwhile the SNP were also victorious in Rosyth - a seat they previously held.
Sharon Green-Wilson received 1,347 votes - ahead of the Conservatives' Margaret Fairgrieve in second on 768 votes.
Turnout in the ward was just 27.5%.