If it happens that by reason of the presence of any military force at or near the place of holding an election in this State, electors duly qualified by the Constitution and laws of this State to vote at such place at the election shall be prevented from or interfered with by military force or by the requirement of oaths unknown to the Constitution and laws in casting their votes, any number of electors not less than 5 may withdraw from the place to any other place within the voting district where such prevention or interference shall take place, and having there, by a majority of the electors present, selected a duly qualified elector of the district, who shall be a freeholder, to act as inspector, deliver to such inspector there their respective ballots. The inspector shall receive the ballots and record the name of the voter upon a list to be kept by that inspector for that purpose and immediately write upon each ballot the name of the person who delivered the same to that inspector, the inspector having first administered to each person offering to vote an oath or affirmation in the following words: