Council candidate Karen Valentine, with 140 votes, trailed Smith by only three votes.
Councilwoman Cindy Cook, who gave up her council seat to run unopposed for town recorder, ended up with 169 votes, according to the unofficial returns.
Approximately 272 of the town's 861 registered voters cast ballots, election officials said.
More than 20 people, including several candidates, milled around outside Town Hall as the votes were being counted inside. Following a long-standing local tradition, election officials posted the unofficial results on the bulletin board outside the building when they finished the count.
Wilson, who said he moved to town two years ago, had singled out problems concerning issues between citizens and what some perceive as a police department that is too aggressive for a small community such as Shepherdstown.
He said after his election Tuesday that he sees the issue as a two-fold effort.
He said he plans to address the problem of perception by appointing a special commission to work on the relationship between citizens and police. The other goal will be to form a blue ribbon task force that will report to the council. It will draft a clear mission statement for the police department to follow on staffing and effort, he said.
Wilson, of 204 S. King St., said he was humbled by his strong showing.
"I may make mistakes, but it won't be for the lack of trying to do the right thing," he said.
Auxer, of 108 E. New St., who ran on his experience as a two-term mayor, listed annexation as a major campaign issue. He said the town needed professional advice and an annexation policy before adding more land.