Incumbent state Rep. Jonah Wheeler will keep his spot as a Democratic candidate on the November general election ballot after winning a recount of the primary election results on Tuesday.

Wheeler maintained a 19-vote margin over write-in candidate Amanda Allen, with Wheeler gaining one vote in Peterborough and Allen losing one in Sharon and gaining two in Peterborough. The final totals from the recount were 789 for Wheeler and 770 for Allen.

State Rep. Peter Leishman, who holds the other House seat in the district, gained one vote in Sharon, totaling 1,190.

Allen had requested the recount, challenging Wheeler’s win after voter confusion over write-in ballot instructions. Some voters wrote “Allen” or “Amanda” on the ballot instead of her full name.

Allen based her argument on the idea that a voter’s intent should be considered if it can be determined, even if the voter did not follow ballot instructions.

Secretary of State David Scanlan determined that votes for “Allen” or “Amanda” would not be counted for Allen’s campaign, according to his office’s spokesperson, Anna Sventek.

Allen has since decided not to challenge the decision by appealing to the Ballot Law Commission and to focus on her write-in campaign for the November general election.