Christopher P. Scanlon beat back challenges from three other Democrats seeking to represent South Buffalo on the Common Council in Thursday's primary.
Scanlon, 31, won in the South District with 56 percent of the vote, according to unofficial results.
He was appointed to the seat in May and had the backing of some of South Buffalo's biggest political names, including Rep. Brian Higgins, Assemblyman Michael P. Kearns, city Comptroller Mark J. F. Schroeder and developer Carl Paladino.
Scanlon won 1,758 votes, defeating fellow Democrats Patrick B. Burke, 28, who had 742 votes; Anthony "A.J." Verel, 42, who got 339 votes; and Kevin M. Lafferty, 32, who received 287 votes.
Turnout was 28 percent.
In November, Verel will appear on the Republican line, and Scanlon will also be on the Conservative line.
The winner will fill a vacancy left by Kearns, for three years.
In other primaries Thursday:
Annette Iafallo defeated Rebecca Darch in a Democratic primary to fill a vacancy in the City Council's 2nd Ward, according to unofficial results.
Iafallo won 422 votes to Darch's 250, with 84 percent of the districts reporting.
Darch, 26, had been appointed to the seat, but Iafallo, 61, won the endorsement of the city's Democratic committee.
In November, Iafallo will also appear on the Conservative line, and Diane M. Kozak will be on the Republican and Independence Party lines.
The winner will fill a Council term that expires at the end of 2013.
Erie County
Republican Stefan I. Mychajliw Jr., 38, defeated Megan M. Lavin, 29, in an Independence Party primary to fill a vacancy in the County Comptroller's Office.
Mychajliw won 690 votes to Lavin's 553 votes, with 95 percent of the districts reporting.
Mychajliw will also appear on the Republican and Conservative lines in November against Democrat David J. Shenk, 42, who will also be on the Working Families Party line. Shenk was appointed comptroller in February, replacing Mark C. Poloncarz, who was elected county executive in November.
An election for a full term will be held next year.
Incumbent Town Justice Victoria B. Zach faced Michael R. Schneider in primaries on five party lines.
Schneider was successful in the Republican, Conservative and Independence primaries, while Zach won the Democratic primary.
Just two Working Families Party voters cast ballots, giving one vote to each candidate, ending in a tie.
In the Democratic primary, Zach won 69 votes to Schneider's 58; in the Republican contest, Schneider got 200 votes to Zach's 99; in the Conservative primary, Schneider had nine votes to Zach's eight; and in the Independence primary, Schneider received 17 votes to Zach's 13.
Zach and Schneider are competing for a four-year term.
Walter C. Cain defeated Matthew L. Smith in two primaries for a four-year term as town justice, giving him a significant edge in the November election.
Cain won 60 votes to Smith's 30 votes in the Democratic primary, and 20 votes to Smith's three votes in an Independence Party primary.
Cain will also appear on the Republican and Conservative Party lines in November, and Smith will appear on the Working Families line.
The winner will replace retiring Justice Daniel C. Kuligowski.