If, prior to a recount, two or more persons have an equal number of votes for any county, city, town, or district office, and a higher number than any other person, the electoral board shall proceed publicly to determine by lot which of the candidates shall be declared elected.
If, prior to a recount, any two or more persons have an equal number of votes and a higher number than any other person for member of the General Assembly or of the Congress of the United States, or if any two or more persons have an equal number of votes and a higher number than any other person for elector of President and Vice President of the United States, the State Board of Elections shall proceed publicly to determine by lot which of them shall be declared elected. Reasonable notice shall be given to such candidates of the time when such elections shall be so determined; and if they, or either of them, shall fail to appear in accordance with such notice, the Board shall proceed so as to determine the election in their absence.
Any person who loses the determination by lot may petition for a recount pursuant to Article 1 (§ 24.2-800 et seq.) of Chapter 8 of this title.
Va. Code § 24.2-674