Democrat Sarah Anker will become the next Suffolk legislator from the 6th District.
A recount Thursday at the county board of elections showed her leading by 171 votes, with only eight potential military ballots to be counted.
Elections officials said the results cannot be certified until Tuesday, the deadline for military ballots to arrive.
The recanvassing showed that Anker, a Mount Sinai resident, received 3,678 votes, or 51.18 percent, and former county lawmaker Martin Haley of Miller Place, a Republican, received 3,407, or 48.73 percent.
The March 29 special election had a 12.83 percent turnout. Unofficial returns on election night had Anker leading by 224 votes, but the margin narrowed after 259 absentee ballots were tallied.