A candidate for any office, position, or nomination which is voted upon only by the voters of one county or part thereof may ask for a recount of the official returns if such candidate is defeated, according to the official returns, by a margin not exceeding two percent of the total vote cast for all candidates for such office, position, or nomination. Any candidate for nonlegislative office shall file a verified petition with the county auditor within three days after the election returns have been canvassed by the official county canvass. Any candidate for legislative office shall file a verified petition with the county auditor within three days after the election returns have been canvassed by the official state canvass. The petition shall state that the candidate believes a recount will change the result of the election and that all of the votes cast for the office, position, or nomination should be recounted. A recount shall then be conducted.
SDCL 12-21-10