Granger, J.
I. At the drawing of the grand jury that found and returned, the indictment in this case, there were placed in the box provided for that purpose ninety-six, instead of seventy-five, names, as *369provided by the letter of the statute, and that fact is made a ground of the motion to quash; and, as the judgment of the district court must be affirmed on another ground of the motion, and, as the court might not be agreed on this question, we deem it inadvisable to consider it at the present time, and dismiss the point, with the suggestion that a substantial compliance with the provisions of the law is required in such matters, and the uncertainty as to what may be regarded as a substantial deviation makes it safest and best, in practice, to adhere as far as may be to the literal provision of the statute.
II. The county of Muscatine has fifteen townships, and under the present law a grand jury for that county consists of seven members. The Code, after providing for seventy-five names as a number from which the grand jurors are to be drawn, provides (section 240) that, “at least twenty days prior to the first day of any term at which a jury is to be selected, the auditor or his deputy must write out the names on the lists aforesaid, * * * on separate ballots, and the clerk of the district court, or his deputy, and sheriff [or his deputy], having compared said ballots with the lists, and corrected the same, if necessary, shall place the ballots in a box provided for that purpose.” The next section provides that the ballots shall be thoroughly mixed, and that the clerk shall draw the requisite number of jurors, which must be twelve in the county of Muscatine, from which number, at each term, seven are to be selected to constitute a panel. It is also provided that, in drawing the twelve jurors to be summoned, not more than one shall be drawn from the same township where the number of townships in the county is equal to or greater than the number of jurors to be drawn, and where more than one are drawn from the same township the officers drawing must reject the superfluous names. The names from which the jurors are to be drawn are furnished to the county auditor by the judges of the election in each election precinct, after notice from him of the number *370required therefrom. It will thus be seen that the law provides that the names from which jurors are to be drawn are to be furnished to the auditor by the judges of election. From the lists of names thus furnished, the auditor is to write the names on separate ballots, and the clerk and sheriff are to compare the ballots with the lists returned to the auditor, and correct errors. The ballots are then to be placed in a box, thoroughly mixed, and the names of the jurors drawn therefrom. The officers, in drawing the grand jurors from which the panel was made that returned the indictment, adopted the following plan: The ballots containing the names returned from each township were separated, and sealed in separate envelopes. These envelopes, fifteen in number, were placed in a box, and the clerk drew therefrom twelve envelopes, which, of course, contained the names returned from twelve townships; and the number of townships thus drawn corresponded with the number of jurors to be drawn. The ballots in each envelope were then taken out, placed in a box, and one ballot drawn therefrom, and the person named thereon was the juror from that township; and in that manner a juror was drawn from each of the twelve townships represented by the envelopes first drawn. This departure from the method prescribed by the Code for drawing the grand jury is made a ground in the motion for quashing the indictment.
It has been held in this state that the provisions of the law in relation to the mode of obtaining jurors are directory. State v. Carney, 20 Iowa, 82; State v. Gillick, 7 Iowa, 287. It is provided by statute that, if the appeal is taken by the defendant from a j udgment against him, the supreme court must examine the record, and, without regard to technical errors or defects which do not affect the substantial rights of the parties, render such judgment on the record as the law demands. Code, sec. 4538. Of course, the validity of the indictment must be determined as if the question was presented on the defendant’s appeal. In view of such statute, and guided by the rule that the statute providing *371a method of obtaining a jury is directory, this court has held that an indictment returned by a grand jury drawn from a box containing but seventy-three, instead of seventy-five, names is valid. State v. Carney, supra. It has also sustained an indictment where the clerk, in preparing for the drawing of the grand jury, placed the ballots, unfolded, in an open hat, instead of in a box, as provided by law, and drew the ballots therefrom. State v. Gillick, supra. In State v. Knight, 19 Iowa, 94, the judges of election returned eighty-five, instead of seventy-five, names, and the excess was stricken off, and the grand jury drawn from the remaining seventy-five. The indictment was sustained. In State v. Brandt, 41 Iowa, 593, there was a failure to return names as. grand j urors from one township, and the board of county canvassers neglected to supply the names, as it was their duty to do, and two members of the board of supervisors, then in session for a specific purpose, supplied the names from such township; and from seventy-five names thus furnished the jury was drawn. Neither of the names furnished by the members of the board of supervisors was drawn on the jury. To the query, should the grand jury, as a body, because of such irregularity, be held illegal, this court gave a negative answer.
These cases are cited as precedents under which the court should sustain the indictment in this case; and the argument is, as to those cases, that the .statute is directory, and the deviation is not such as to affect the substantial rights of the parties. To what extent officers of the law may depart from the course prescribed without affecting the substantial rights of parties is a question very difficult of judicial determination, and one as to which, as we are informed, no law-writer has attempted a solution. It is true that in many cases such fact is apparent, or may be affirmatively established by proofs. In many cases, however, the courts are left to assume the fact merely because of chances or opportunities from which it might arise. As indicating when the court will assume prejudice, we may look at the *372case of Dutell v. State, 4 G. Greene, 125. In the preparation for drawing the grand jury, the law then required that the ballots and the lists of names returned should be compared and corrected by the county judge and sheriff. In comparing and correcting, in that case, the deputy sheriff acted instead of the sheriff. It was held that the deputy had no right, under the statute, to act in such a case for the sheriff, and that the departure was fatal to the indictment. In the case of State v. Brandt, supra, upon- the same state of facts, the indictment was held bad, though by a divided court; and it is said in the opinion that the defendant “is prejudiced in his substantial rights.” In State v. Bowman, 73 Iowa, 110, the indictment was quashed because of an irregularity in impaneling the grand jury under the present law. The judge at the prior term advised the jurors that they need not attend at the next term. At the term, however, a grand jury was impaneled, but without notice to the regular jurors, and it appeared that at least two of the regular jurors were absent because of the direction of the judge. The indictment was held bad because found by a grand jury illegally constituted. This must have been a holding that the substantial rights of the defendant were affected, because the statute, as to such rights, applies to the entire proceeding in a criminal case.
Looking to the case at bar, it is proper to inquire how great a change was effected by the mode adopted by the clerk. If the course prescribed in the law is pursued, in the box from which the drawing is had there will be names from each township in the county, aggregating seventy-five. The twelve jurors, when drawn, will represent one from each of twelve townships. The personnel of the twelve jurors, in this case, is made to depend on the chances of a mixture of the seventy-five names returned from all the townships, except as the number is diminished by the drawings made. A ballot with the name of A. has at least twelve chances of being drawn with every other name. The method adopted by-*373the clerk introduced one drawing not provided for by law, — that of first selecting the townships to be represented on the grand jury. That feature of the drawing would certainly have been just as legal if he had used fifteen ballots with the names of the townships thereon, as to put the names in an envelope, sealed, and the name of the township on the envelope; so that that drawing was an entirely new device, and entirely without authority of law. The effect of this illegal proceeding was to eliminate from the drawing anticipated by the statute the names returned from three of the townships of the county. After this, by separate drawings, a name is selected from each township of the twelve selected. It cannot, of course, be said positively that the same twelve would not have been selected by pursuing the legal method, but the probabilities are largely against it. But we need not inquire as to that. No more could we say the same twelve would not have been selected if the clerk had omitted any drawing, and recorded a name from each of twelve of the list returned from the townships. If we are to sustain this indictment, it is difficult to see why we should not sustain them in cases of a wider departure from the provisions of the law, even to the extent of the methods suggested, of taking the names directly from the lists. If, to the validity of an indictment, a drawing by ballot of the grand jurors is absolutely necessary, the drawing should certainly be in substantial conformity to the provisions of the law. The one is not a necessity without the other. The proceedings in this case seem to us to be a substantial departure from its ■ provisions. If we should refer to the liability of abuse in such a proceeding, ■ and the danger of thwarting the purposes of the law, in having the result one of chance in the selection of a grand jury, it would be easy to show how a designing officer might secure his preference as between the townships. In the county of Muscatine one township (Muscatine) had thirty-four names on the •list. Other townships had no more than two. With *374the ordinary envelope for drawing, how easily an officer conld select or reject the envelope with thirty-four ballots, and thus secure a preference he might have. The statutory course does not admit of such an advantage.
In this connection, it should be said that both the judge, in an opinion, and counsel for appellant, in argument, state in substance that no claim is made that any of the officers acted with any design to do otherwise than select a fair and impartial jury from the names on the list, and that there is not the slightest evidence tending to show they had any motive but to discharge the duties devolved on them by the law. It appears to have been an attempt to reach the same result by what was thought to be a better method. In this, we think, there was such a departure as to invalidate the indictment.
The record presents some other objections to the indictment, which we think not fatal, and unnecessary to discuss. The judgment of the district court is
Aeeirmed.