This is an appeal by which the State challenges a district court order dismissing charges of burglary and theft filed against defendant under sections 713.3 and 714.2(3), Iowa Criminal Code, becausé the State failed to bring defendant before a magistrate within twenty-four hours after his arrest, thus violating rule 2(1), Iowa R.Crim.P. We reverse and remand for trial on the merits.
Defendant was arrested on September 22, 1978, at 4:00 a. m. He was not brought before a magistrate until September 23, 1978, at 9:00 a. m., a lapse of twenty-nine hours. Defendant moved that the charges against him be dismissed because he was not brought before a magistrate “without unreasonable delay.” However, this motion was overruled. Subsequently, the State *33filed a motion to dismiss the information. The State’s motion was granted on October 6, 1978, and an order was entered dismissing the charges.
On the same day another information was filed charging defendant with the same crimes. He thereupon filed a motion. to dismiss on the ground that the first dismissal was with prejudice, barring further prosecution. The motion was resisted, but after hearing, the trial court dismissed the charges, holding that the first dismissal had been with prejudice. The State appeals from this order.
Rule 2, Iowa R.Crim.P. provides as follows:
1. Initial appearance of defendant. An officer making an arrest with or without a warrant shall take the arrested person without unnecessary delay before a committing magistrate as provided by law.
Rule l(2)(c) defines unnecessary delay as follows:
“Unnecessary delay” is any unexcused delay longer than twenty-four hours, and consists of a shorter period whenever a magistrate is accessible and available.
The State concedes this rule was violated by failure to produce defendant before a magistrate within the specified twenty-four hour period. The question then becomes one of determining if the penalty for such violation is a dismissal of the charges.
The trial court relied almost entirely upon State v. Johnson, 217 N.W.2d 609 (Iowa 1974). That was a case involving speedy trial. We do not believe it is applicable here. We are not now dealing with a speedy trial issue nor are we dealing with a speedy indictment case. See Rule 27(2), Iowa R.Crim.P. We are dealing solely with a failure of the State to produce the defendant before a magistrate without unnecessary delay following his arrest.
We believe the matter is controlled by our rules. Defendant was charged with a felony. Under such circumstances, a dismissal on the application of the county attorney does not preclude further prosecution for the same charges. This is clear from rule 27, Iowa R.Crim.P. which provides:
1. Dismissal generally: effect. The court, upon its own motion or the application of the county attorney, in the furtherance of justice, may order the dismissal of any pending criminal prosecution, the reasons therefor being stated in the order and entered of record, and no such prosecution shall be discontinued or abandoned in any other manner. Such a dismissal is a bar to another prosecution for the same offense if it is a simple or serious misdemeanor; but it is not a bar if the offense charged be a felony or an aggravated misdemeanor. [Emphasis added].
This rule is dispositive of the present appeal. This does not mean the State may use this rule to harass a defendant or bring repeated charges against him. Our holding is limited to those instances in which the State acts to dismiss pending proceedings because of good-faith failure to comply with the rule. Cf. State v. Burton, 231 N.W.2d 577, 578 (Iowa 1975) (State should not dismiss as a subterfuge to avoid speedy trial statute). There is no claim here that the State acted in bad faith.
The order of dismissal is reversed and the case is remanded for trial on the merits.
REVERSED AND REMANDED.