If, in any case of a contest on the ground of illegal votes, it appears that a person other than the one returned has the highest number of legal votes after the illegal votes have been eliminated, the court must declare such person nominated or elected, as the case may be.
Mont. Code Ann. § 13-36-212
Declaration of result of election after rejection of illegal votes
En
Official source: Montana Code Annotated (Montana Legislature). Reproduced from public-domain Montana statutes; confirm against the official source for the current text. Not legal advice.