
230 Kan. 783 (1982)
641 P.2d 394
STATE OF KANSAS, Appellant,
v.
BRYAN LEE CROUCH and GREGORY ALLEN REEDER, Appellees.
No. 53,534
Supreme Court of Kansas.
Opinion filed February 27, 1982.
David R. Platt, assistant county attorney, argued the cause, and Robert T. Stephan, attorney general, and Steven L. Opat, county attorney, were with him on the brief for the appellant.
David P. Troup, of Weary, Davis, Henry, Struebing & Troup, of Junction City, argued the cause and was on the brief for the appellee, Bryan Lee Crouch.
Chris McNeil, of Junction City, argued the cause and was on the brief for the appellee, Gregory Allen Reeder.
The opinion of the court was delivered by
PRAGER, J.:
This is an appeal by the State from orders dismissing a criminal complaint previously filed against the defendants, Bryan Lee Crouch and Gregory Allen Reeder, because the State did not comply with the provisions of K.S.A. 22-2901, by failing to take the defendants before a magistrate until eleven days after their arrest.
For purposes of this appeal, the facts are undisputed and are as follows: On July 2, 1981, an automobile was stolen from a parking lot in Junction City. Its description was broadcast to police officers in the area. On July 3, 1981, the car was discovered, in the possession of defendants, being repainted by the defendants. The police officers made a probable cause arrest, and the defendants were taken to and incarcerated in the Junction City *784 jail. On July 6, 1981, the next working day, bond was set by the court for defendants at the request of the State. However, defendants were never notified that bond had been set. On July 10, 1981, a formal complaint was filed charging each of the defendants with felony theft (K.S.A. 21-3701). Defendants continued to languish in jail and were finally brought before the district court for first appearance on July 14, 1981. At that time, counsel was appointed for each of the defendants and a date was set for the preliminary hearing.
The Eighth Judicial District, of which Geary County is a part, has six judges, two of whom reside in Geary County. There was at least one judge assigned for duty and available to handle first appearances on July 6th through the 10th and on July 13th. At the first appearance on July 14, counsel was appointed. Each of the defendants was released on bond on July 17, 1981. Counsel for each of the defendants then filed a motion to dismiss the complaint with prejudice based on the failure of the State to bring defendants before a magistrate until eleven days after they were arrested. The trial judge sustained each motion and dismissed the complaint with prejudice as to each defendant. In each instance, the trial court found that the defendant had been prejudiced by the delay in bringing that defendant before a magistrate. The trial court stated in the record, in substance, that being kept in jail for eleven days without being brought before a magistrate has to weaken the resolve of the defendant and is in direct violation of K.S.A. 22-2901 and that holding the defendant that long without an appearance before the court is in itself prejudice. The court, at the time it dismissed the complaint with prejudice as to the defendant, Crouch, stated on the record that an additional reason for the court's decision was that the keeping of the defendant in jail eleven days before bringing him before a magistrate constituted intimidation and cruel and unusual punishment. The State promptly filed an appeal from the orders dismissing the complaint with prejudice as to each defendant.
The sole issue stated by the State on appeal is whether the incarceration of the defendants for eleven days from date of arrest to their first appearance before a magistrate resulted in such prejudice to their statutory and constitutional rights that it warranted the dismissal with prejudice of the charges against them. The issue raised requires the court to interpret the effect of K.S.A. 22-2901 which provides in pertinent part as follows:

*785 "22-2901. Appearance before the magistrate. (1) When an arrest is made in the county where the crime charged is alleged to have been committed, the person arrested shall be taken without unnecessary delay before a magistrate of the court from which the warrant was issued. If the arrest has been made on probable cause, without a warrant, he shall be taken without unnecessary delay before the nearest available magistrate and a complaint shall be filed forthwith.
"(2) When an arrest is made in a county other than where the crime charged is alleged to have been committed, the person arrested may be taken directly to the county wherein the crime is alleged to have been committed without unnecessary delay or at the request of the defendant he shall be taken without unnecessary delay before the nearest available magistrate. Such magistrate shall ascertain the nature of the crime charged in the warrant and the amount of the bond, if any, endorsed on the warrant. If no warrant for the arrest of the person is before the magistrate he shall make use of telephonic, telegraphic or radio communication to ascertain the nature of the charge and the substance of any warrant that has been issued. If no warrant has been issued, a complaint shall be filed and a warrant issued in the county where the crime is alleged to have been committed, and the nature of the charge, the substance of the warrant, and the amount of the bond shall be communicated to the magistrate before whom the defendant is in custody. Upon receipt of such information, the magistrate shall proceed as hereinafter provided.
"(3) The magistrate shall fix the terms and conditions of the appearance bond upon which the defendant may be released. If the first appearance is before a magistrate in a county other than where the crime is alleged to have been committed, the magistrate may release the defendant on an appearance bond in an amount not less than that endorsed on the warrant. The defendant shall be required to appear before the magistrate who issued the warrant or a magistrate of a court having jurisdiction on a day certain, not more than 10 days thereafter."
It should be noted that K.S.A. 22-2901 provides no sanctions in the event there is unnecessary delay in taking a person under arrest before the nearest available magistrate. K.S.A. 22-2901 is patterned after similar provisions found in Rule 5 of the Federal Rules of Criminal Procedure (18 U.S.C.A. Rule 5) and in statutes adopted in other states. There are many cases which hold that the purpose of requiring a person under arrest to be taken to a magistrate without unnecessary delay is to safeguard individual rights without hampering effective and intelligent law enforcement. See Mallory v. United States, 354 U.S. 449, 1 L.Ed.2d 1479, 77 S.Ct. 1356 (1957), which discusses Rules 4 and 5 of the Federal Rules of Criminal Procedure; State v. Steeves, 279 Minn. 298, 157 N.W.2d 67 (1968); 21 Am.Jur.2d, Criminal Law § 408, pp. 677-79. It has also been stated that the purpose of the rule is to abolish unlawful detention that provides an opportunity for improper *786 pressure by the police before the arrestee has been informed of his rights. United States v. Carignan, 342 U.S. 36, 96 L.Ed. 78, 72 S.Ct. 97 (1951). It is designed to reduce the opportunity for third-degree practices by the police and to protect the rights of the accused by making certain that he is advised of his constitutional rights by a judicial officer. United States v. Mendoza, 473 F.2d 697 (5th Cir.1973); United States v. Middleton, 344 F.2d 78 (2d Cir.1965); Naples v. United States, 307 F.2d 618 (D.C. Cir.1962); Wheeler v. United States, 382 F.2d 998 (10th Cir.1967). The reason for the rule is also discussed in McNabb v. United States, 318 U.S. 332, 87 L.Ed. 819, 63 S.Ct. 608 (1943), where Justice Frankfurter states that such statutory provisions constitute an important safeguard, not only in assuring protection for the innocent, but also in securing conviction of the guilty by methods that commend themselves to a progressive and self-confident society. They aim to avoid the evil implications of secret interrogation of persons accused of crime.
This court has heretofore considered the requirements of K.S.A. 22-2901 in situations where there were delays ranging from forty-two hours to thirteen days in bringing an arrested person before a magistrate. In State v. Goodseal, 220 Kan. 487, 500, 553 P.2d 279 (1976), it was held that unwarranted delay in taking a prisoner before a magistrate after he has been arrested is not in itself a denial of due process unless it has in some way prejudiced the right of the accused to a fair trial. Whether a delay is unreasonable or prejudicial must depend on the facts and circumstances of each case. The opinion also points out Kansas cases holding that delays of six days (Underwood v. State, 214 Kan. 633, 522 P.2d 457 [1974]), thirteen days (Cooper v. State, 196 Kan. 421, 411 P.2d 652 [1966]), and two days over a weekend (State v. Nading, 214 Kan. 249, 519 P.2d 717 [1974]), were not prejudicial so as to justify setting aside a conviction in the particular case. In Cooper, Justice Fontron emphasized that the court did not approve of unwarranted delay, either in the filing of formal charges against a suspect who is confined in jail, or in taking him before a proper magistrate for examination. He stated that, when a person is arrested for a crime, either with or without a warrant, he is to be taken before a magistrate with reasonable promptness and without unnecessary delay. A delay of two weeks indicated indifference on the part of law enforcement officers toward their *787 official responsibilities. Such official shortcomings should not be condoned. In Cooper, it was pointed out that the action was not one to test the validity of an arrest, nor one to recover damages for an illegal detention. Neither was it a proceeding to gain release from an unlawful custody prior to trial. The case attacked the validity of the sentence pronounced against the plaintiff after the plaintiff had entered a plea of guilty to the charges and no appeal had been taken from the sentence imposed.
We recognize, of course, that a defendant's right to a speedy trial attaches when he becomes accused and the criminal prosecution begins, usually by either an indictment, an information, or an arrest, whichever first occurs. State v. Taylor, 3 Kan. App.2d 316, 594 P.2d 262 (1979); Dillingham v. United States, 423 U.S. 64, 46 L.Ed.2d 205, 96 S.Ct. 303 (1975). Ordinarily the right to a speedy trial is to be gauged under the flexible standards constitutional test. State v. Clark, 222 Kan. 65, 68-69, 563 P.2d 1028 (1977); State v. Fink, 217 Kan. 671, 538 P.2d 1390 (1975). In Barker v. Wingo, 407 U.S. 514, 33 L.Ed.2d 101, 92 S.Ct. 2182 (1972), the court defined the factors to be considered upon a constitutional claim of denial of speedy trial. Such a claim is subject to a balancing test in which the conduct of both the prosecution and the defendant are to be weighed. Each case must be determined on its own facts. Four factors were identified: (1) length of the delay; (2) reason for the delay; (3) the defendant's assertion of his rights; and (4) prejudice resulting to the defendant. None of these factors is controlling. Rather, they should be considered together with such other circumstances as may be relevant. Kansas has adopted this test. State v. Cuezze, Houston & Faltico, 225 Kan. 274, 589 P.2d 626 (1979).
The briefs of counsel and our research have produced no cases which authorize dismissal of an indictment or complaint for unnecessary delay in taking a defendant before a magistrate. The sanctions usually suggested for a violation of statutes such as K.S.A. 22-2901 are: (1) liability for tort damages for wrongful detention; (2) the suppression of a confession or physical evidence which is found to be the product or fruit of the wrongful detention; or (3) habeas corpus to obtain immediate release from custody.
With the above principles in mind, we turn now to a resolution of the issue which has been presented to the court on this appeal. *788 We have concluded that the dismissal of a criminal complaint with prejudice because of a violation of K.S.A. 22-2901 is a sanction which should be imposed only under extremely compelling circumstances. We recognize, however, that, in a proper case, a district court in this state has the power to dismiss a criminal complaint with prejudice, if the interests of justice require such action. Such power should be exercised, however, with great caution and only in cases where no other remedy would protect against abuse. Where a trial court finds that a violation of K.S.A. 22-2901 has resulted in prejudice to the defendant's right to a fair trial, then the trial court should take appropriate action. The trial court, in its discretion, may suppress a confession or physical evidence, if such is the product of the wrongful misconduct. In determining the appropriate remedy, a trial court should consider the four factors identified in Barker v. Wingo: the length of the delay, the reason for the delay, the defendant's assertion of his rights, and prejudice resulting to the defendant. In addition, the court should consider the severity of the crime charged. We want to emphasize that the purpose of K.S.A. 22-2901 and similar statutes is not to penalize the police or the public but to protect the rights of the accused.
In the present case, the defendants were arrested and taken promptly by the police officers to the city jail. The county attorney was notified of their presence in jail. The responsibility then fell on the county attorney to see that K.S.A. 22-2901 was complied with by taking the defendants without unnecessary delay before a magistrate. The county had the responsibility to provide the county attorney with sufficient deputies to carry out those responsibilities placed on him by statute.
From all the facts and circumstances, we have concluded that this was not an appropriate case for the district court to enter its order dismissing the criminal complaint with prejudice and discharging the defendants. The court erred in taking that action. We, therefore, reverse and remand the case to the district court with directions to set aside the orders of dismissal, to reinstate the complaint, to release the defendants on their bonds previously provided, and then to proceed with the preliminary examination as required by the Kansas Code of Criminal Procedure.
HOLMES, J., dissenting.
I respectfully dissent from the ultimate conclusion of the *789 majority that the trial court erred in dismissing the complaints against the defendants and in discharging them.
It is clear that the majority is of the opinion that the sanctions to be imposed for a violation of K.S.A. 22-2901 lie within the sound discretion of the trial court. I agree. The majority concedes that the trial court has the power to dismiss a criminal complaint with prejudice for violation of K.S.A. 22-2901 but determines that "this was not an appropriate case" for such a dismissal. I disagree.
The record indicates that the prolonged imprisonment of the defendants without being brought before a magistrate "without unnecessary delay" was not an isolated or rare incident in Geary County. Evidently the practice had prevailed for some time and while the trial judge was understandably reluctant to place specific blame for such delays, he did state for the record: "The Court does .... find that the fault lies with the situation in which the County Attorney's Office in this county has to work, which is not the fault of that office." As noted by the majority, it was the responsibility of the county attorney to see that K.S.A. 22-2901 was complied with. However, the county attorney, in his brief and in arguments before this court, offered no explanation or excuse for the delay. The best that could be said is that the county attorney's office is now aware of the problems and is hopeful they have been rectified. Evidently the action of Judge Christner in this case got someone's attention.
The majority, in effect, has found that Judge Christner abused his discretion. In my opinion the trial court did not abuse its discretion and I would affirm the trial court.
FROMME and MILLER, JJ., join the foregoing opinion.
