The election authority shall keep all voted ballots, ballot cards, processed ballot materials in electronic form and write-in forms, and all applications, statements, certificates, affidavits and computer programs relating to each election for twenty-two months after the date of the election. During the time that voted ballots, ballot cards, processed ballot materials in electronic form and write-in forms are kept by the election authority, it shall not open or inspect them or allow anyone else to do so, except upon order of a legislative body trying an election contest, a court or a grand jury. After twenty-two months, the ballots, ballot cards, processed ballot materials in electronic form, write-in forms, applications, statements, certificates, affidavits and computer programs relating to each election may be destroyed. If an election contest, grand jury investigation or civil or criminal case relating to the election is pending at the time, however, the materials shall not be destroyed until the contest, investigation or case is finally determined.
§ 115.493, RSMo