
172 N.W.2d 144 (1969)
Ronald D. ELY, Appellee,
v.
Charles HAUGH, Warden, Appellant.
No. 53644.
Supreme Court of Iowa.
November 12, 1969.
*145 Richard C. Turner, Atty. Gen., and William A. Claerhout, Asst. Atty. Gen., and Robert H. Story, County Atty., for appellant.
Robert R. Beckmann, Anamosa, for appellee.
BECKER, Justice.
This case is an appeal from order granting writ of habeas corpus. After jury trial applicant was found guilty of the crime of burglary. On December 19, 1967 he was sentenced to 20 years imprisonment at the Men's Reformatory at Anamosa, Iowa. Defendant did not appeal. On June 25, 1968 he filed application for writ of habeas corpus; an attorney was appointed to represent him, hearing was held on August 30, 1968 and on November 18, 1968, the trial court ordered the writ sustained and respondent-warden was directed to release the prisoner. Respondent appeals. We affirm in part, modify and remand for further order.
*146 Applicant-prisoner was defendant in the original case and will hereafter be referred to as defendant. Respondent Haugh represents the State of Iowa and will hereafter be referred to as the State.
Defendant made several complaints in his application but the trial court decided the matter on one issue which is decisive of the case. We therefore confine our attention to that issue and thus limit our factual statement.
Defendant was indicted on September 27, 1967 for the crime of larceny in the nightime and October 11, 1967 for the crime of burglary. Robert Scism was appointed to defend him. Defendant testified Mr. Scism told him that if he pled guilty to the latter charge he would receive a 10 year sentence and would be paroled. Mr. Scism denied having made such a statement or promise but testified to conversations with defendant wherein he indicated a parole was a reasonable hope because defendant had no prior adult record. (Apparently defendant had a juvenile record). Other factors were present in this exchange which need not be detailed here.
Defendant entered a plea of guilty to burglary and was sentenced to 10 years. The next day he was informed the court had no authority to sentence him to 10 years, the statute requires a mandatory 20 year sentence (under the Iowa Indeterminate Sentence Act), and the court offered to allow him to change his plea. Defendant pled not guilty, his attorney resigned and Martin Dunn was appointed in his stead.
During the subsequent jury trial the State called the court reporter who reported the original plea of guilty and withdrawal thereof. Defendant took the stand and gave essentially the same testimony he gave at this habeas corpus hearing about promise of a 10 year sentence and parole. The State then called Mr. Scism to refute such testimony. Mr. Scism gave his version of the plea and withdrawal thereof. Mr. Dunn, defendant's trial counsel at the time, moved for a new trial raising the admission of such evidence as error and prepared to appeal. The appeal was not perfected. Defendant testified he was told that if he appealed other charges (one already pending) would be pressed against him. He therefore did not appeal. Both lawyers deny having made such a statement.
The trial court's decision included the following: "* * * Upon the whole record, it is the judgment of this Court that the admission into evidence of the defendant's withdrawn plea of guilty on the trial to a jury of the same criminal charge so greatly prejudiced the rights of the defendant as to deprive him of his right to a fair trial and was consequently violative of his constitutional guarantees to due process of law."
The State raises three questions:
"1. Whether habeas corpus provides a remedy by which a petitioner may obtain relief based on a ground which could have been, but was not raised on direct appeal; and
"2. Whether a withdrawn plea of guilty may later be used against a defendant as evidence in a jury trial on the same charge.
"3. Whether immediate release was the appropriate remedy under the circumstances of this case."
I. In reviewing habeas corpus matters of this kind we adhere to the following rules. The purpose of a habeas corpus hearing is not to determine the guilt or innocence of the prisoner of the crime charged, nor to pass upon nonconstitutional errors in his trial, nor to retry the facts and pass upon the sufficiency of the evidence. Scalf v. Bennett, 260 Iowa 393, 147 N.W.2d 860. But lack of due process by invasion of a constitutional right is a ground for granting habeas corpus either as an additional ground for sustaining the writ or because such lack is a jurisdictional defect. Sewell v. Lainson, 244 Iowa 555, *147 565-566, 57 N.W.2d 556. Ordinarily, where there is a claim of denial of constitutional rights we will accept and give effect to the trial court's determination of disputed facts if there is substantial evidence to support the court's findings. State v. Sefcheck, Iowa, 157 N.W.2d 128, 134.
II. We consider the second assignment of error first. Does admission of evidence showing a prior withdrawn plea of guilty in the same case constitute reversible error? This question is extensively treated in an annotation found at 86 A.L.R.2d 326 (superceding annotation at 124 A.L.R. 1527). The numerical weight of authority supports the view set forth in State v. Joyner, 228 La. 927, 84 So.2d 462, 463: "The majority of the jurisdictions support the view that evidence of a plea of guilty and its withdrawal is inadmissible. This view is predicated `upon the broad principle that to permit such withdrawal to be accompanied with the privilege on the part of the prosecution of later establishing the same as an admission or confession of guilt would result in the destruction or serious impairment of whatever benefits accrued to the defendant from withdrawal of his plea of guilty, and upon the further ground that withdrawal of a plea of guilty is equivalent to an adjudication that such plea is annulled and of no force and effect, and hence, ceases to be evidence.' 124 A.L. R. 1527. See, also, the authorities therein cited, and 2 Wharton on Criminal Evidence, Eleventh Edition, 976, Section 587.
"We think the majority view is sound and more consonant with our concept of the constitutional rights of an accused. Where the plea of guilty is withdrawn, the defendant stands for trial upon a plea of not guilty, and is entitled to all the safeguards and presumptions of innocence which the humanity of the law extends to an individual whose life or liberty is at stake. One such right is that he is presumed to be innocent until proved guilty beyond a reasonable doubt, and the state has the burden of proving that guilt.
"As pointed out by the United States Supreme Court in Kercheval v. United States, 274 U.S. 220, 47 S.Ct. 582, 583, 71 L.Ed. 1009, a leading case on this subject, `The effect of the court's order permitting the withdrawal was to adjudge that the plea of guilty be held for naught. Its subsequent use as evidence against petitioner was in direct conflict with that determination. When the plea was annulled it ceased to be evidence. By permitting it to be given weight the court reinstated it pro tanto.'"
There is one Iowa case in the criminal field dealing with the subject, State v. Briggs, (1886), 68 Iowa 416, 424, 27 N.W. 358, 361: "When the defendant was arrested and taken before the magistrate for preliminary examination the information was read to him, and he was asked by the magistrate what plea he desired to enter, and he answered that he pleaded guilty to the charge. He had not then been informed by the magistrate of his right to the aid of counsel. On the trial the state was permitted, against his objection, to prove this admission. The ground of the objection urged against the admission of the evidence is that under the statute defendant could not be required, on preliminary examination, to plead to the information, and that his plea of guilty was therefore a mere nullity, and was not admissible in evidence for any purpose; also that as he was not then informed as to his legal rights in the matter, but was required by the magistrate to enter a plea, his plea of guilty was not a voluntary admission of his guilt, and was therefore not admissible in evidence against him. It is true that the statute does not contemplate or require the entry by the defendant of a formal plea to the preliminary information. The plea entered by the defendant, however, was an admission by him of his guilt; and it cannot be said that such admission was extorted from him by the magistrate. He was required to enter a plea, it is true, but he had the privilege of pleading either guilty or not guilty; and, as he elected to enter the former plea, his *148 admission must be regarded as having been voluntarily made. It was therefore admissible in evidence against him."
We need not consider the impact of such recent cases as Gideon v. Wainwright, 372 U.S. 335, 83 S.Ct. 792, 9 L.Ed.2d 799; Escobedo v. Illinois, 378 U.S. 478, 84 S.Ct. 1758, 12 L.Ed.2d 977; and Miranda v. Arizona, 384 U.S. 436, 86 S.Ct. 1602, 16 L.Ed.2d 694 on the situation set out in State v. Briggs.[1] The courts recognize a factual difference between a plea at a preliminary proceeding and a withdrawn plea of guilty which had been made to the committing court. McCormick, Law of Evidence, section 242, page 511, says: "* * * It is stated generally that the greater number of decisions admit in evidence the plea of guilty given at the preliminary hearing and exclude such a former plea when given at arraignment and later permitted to be withdrawn, * * *."
We hold a withdrawn district court plea of guilty is inadmissible in the same criminal case as evidence against the accused and admission of such evidence is reversible error. In addition to the cases cited in 86 A.L.R.2d 326 and Later Case Service, See State v. Wright, 103 Ariz. 52, 436 P.2d 601; IV Wigmore on Evidence, Third Ed., section 1066, page 66 and Pocket Part; 2 Wharton's Criminal Evidence, section 587, page 976.[2]
III. We have decided the admission of evidence of the withdrawn plea of guilty is reversible error. Does habeas corpus provide a remedy for such prejudicial error where the matter could have been, but was not, raised on direct appeal ?
As noted earlier, habeas corpus cannot be used as a substitute for direct appeal. Ford v. State, 258 Iowa 137, 138 N.W.2d 116. In Sewell v. Lainson, 244 Iowa 555, 565, 57 N.W.2d 556, 562, we restated the early Iowa rule and then recognized that violation of a constitutional right could also be reached by habeas corpus: "The trial court cited and relied upon Lockard v. Clark, 166 Iowa 556, 147 N.W. 900, holding that if the petitioner was tricked into entering a plea of guilty he should have raised the question when sentence was pronounced or applied for correction of the record; and such cases as McCormick v. Hollowell, 215 Iowa 638, 246 N.W. 612, Convey v. Haynes, 230 Iowa 485, 298 N.W. 647, 134 A.L.R. 966, and Reeves v. Lainson, 234 Iowa 1034, 14 N.W.2d 625, which lay down the rule that if the sentencing court has jurisdiction of the person and the subject matter, habeas corpus will not lie. These were not concerned with the recent decisions of the United States courts which either add lack of due process by invasion of a constitutional right as an additional ground for sustaining the writ, or make such lack a jurisdictional defect." Sewell v. Lainson held claimed lack of due process a proper subject of habeas corpus inquiry and we have since repeatedly recognized the rule. Larson v. Bennett, Iowa, 160 N. W.2d 303.
The question of when an error in trial reaches constitutional dignity is in the process of examination by all courts. The tension between orderly procedure which requires all errors to be raised on direct appeal and the extension of constitutional questions to post conviction remedies is well illustrated by the New York Court of Appeals in People ex rel. Keitt v. McMann, 18 N.Y.2d 257, 273 N.Y.S.2d 897, 220 N.E. 2d 653, 655: "Our holding today that habeas corpus is available to test a claim that the introduction of certain evidence violated both due process and the privilege against *149 self incrimination requires us to acknowledge that habeas corpus is an appropriate proceeding to test a claim that the relator has been imprisoned after having been deprived of a fundamental constitutional or statutory right in a criminal prosecution, including, but not limited to, the right to be tried and sentenced by a court having jurisdiction over the charge and the person. * * *
"Lest anyone be misled, we add this caveat. We have intimated that to adhere to the rigidities of traditional practice and procedure would be contrary to the spirit and purposes of the writ. (Citations). While cases may arise where the right to invoke habeas corpus may take precedence over `procedural orderliness and conformity' (Citations), we are not holding that habeas corpus is either the only or the preferred means of vindicating fundamental constitutional or statutory rights (Citations). Departure from traditional orderly proceedings, such as appeal, should be permitted only when dictated, as here, by reason of practicality and necessity. We emphasize that this is not a case where review of a mere error, allegedly committed at the trial is sought. In such case, the writ may not be utilized as a substitute for appeal or to again review the errors already passed on in an earlier appeal."
IV. The allegation that admission of evidence of the withdrawn plea of guilty violated due process brings the issue within the ambit of habeas corpus jurisdiction. The more difficult problem is whether this error rises to the dignity of violation of a constitutional right. As was said in Fay v. Noia, 372 U.S. 391, 83 S.Ct. 822, 9 L.Ed. 2d 837, "Each case must stand on its [own] facts."
Wood v. United States, (1942), 75 U.S. App.D.C. 274, 128 F.2d 265, 279, cited by defendant, is factually different from this case in that the plea of guilty before a police court was made without benefit of counsel and the decision is limited to such facts. But the court makes an exhaustive analysis of the propriety of using such evidence. Under the factual situation in that case the court concluded admission of a plea of guilty violated both the privilege against self-incrimination and the right to counsel. The due process norm is stated in Spencer v. Texas, 385 U.S. 554, 563-564, 87 S.Ct. 648, 653, 17 L.Ed.2d 606: "* * * the Due Process Clause guarantees the fundamental elements of fairness in a criminal trial. * * *."
United States ex rel. Spears v. Rundle, 268 F.Supp. 691, 698, 699 (D.C.1967), is factually much like this case. Petitioner was a state prisoner. The record showed a plea of guilty entered when the accused had counsel and later withdrawal of the plea. The court said: "* * * The circumstances surrounding the plea are confusing, and the record does not make this clear since there is no transcript of the arraignment. When the court later permitted the withdrawal of the pleas, it recognized some inadequacies. To later use this plea against him after a recognition of the inherent weaknesses it contained completely negates the permission to withdraw which was given in an exercise of the court's discretion. This lays a trap for the defendant. Our question is whether the Constitution permits this to occur.
"* * * There is no record of questions asked Spears as to why he wished to plead guilty, if he understood the crime, or whether he made the plea on promises of leniency. However, shortly after the day on which this plea was made, relator appeared in chambers and told the court that he wanted to withdraw the plea. The court permitted him to do so. The precise reasons do not appear. However, from the totality of circumstances we can conclude that the court considered the pleas to be involuntary either because he was badgered into so pleading, or because he was not aware of the specific charges to which he was pleading. The withdrawal of the plea was permitted, and this in itself vitiates any possible waiver of defendant's privilege, against self-incrimination. The *150 privilege could not be involuntarily or ignorantly waived, and in view of the permission given to withdraw the plea we find that the plea of guilty did not operate as a waiver. Therefore, it could not be offered into evidence against relator without infringing his privilege not to incriminate himself. That the Fifth Amendment privilege against self-incrimination is now applied to state court proceedings by virtue of the Fourteenth Amendment is now undisputed. Malloy v. Hogan, 378 U.S. 1, 84 S.Ct. 1489, 12 L.Ed.2d 653 (1964). This right extends to convictions which were final before Malloy was decided (Griffin v. State of California, 380 U.S. 609, 85 S. Ct. 1229, 14 L.Ed.2d 106 (1965), and would apply to relator who was sentenced approximately one month before Malloy was decided and appealed after Malloy. The use in evidence, therefore, of a prior withdrawn guilty plea violated relator's constitutional rights guaranteed by the Fifth and Fourteenth Amendments, requiring that this Court grant the writ of habeas corpus."
The Minnesota Supreme Court considered the problem in a little different factual situation. Evidence of the prior withdrawn plea of guilty was not introduced (this had previously been declared error in Minnesota) but the prosecutor in final argument told the jury of the withdrawn plea. In State v. Reardon, 245 Minn. 509, 73 N.W.2d 192, 195, the Minnesota court said:
"The state contends that whether or not there was prejudice requiring a new trial is determined by whether or not the error affected the result. There is authority for this propositionbut where the constitutional right to a fair trial is denied, we are unwilling to adopt a theory which in effect assumes that, where proof is strong, due process may be suspended. Due process as guaranteed by the Minnesota and Federal Constitutions includes within its broad protection the right of a person to be tried according to law and the evidence in the case. Holden v. Hardy, 169 U.S. 366, 18 S.Ct. 383, 42 L.Ed. 780; Lowery v. State, 21 Ala.App. 352, 108 So. 351. It is true there is cogent evidence to support the verdict; and it may be expected that on a second trial the result would be the same. But to allow factually strong cases to erode such a basic right is to deny the existence of the right." (Emphasis supplied).
State v. Joyner, supra, quoted at length in Division II does not place the decision on constitutional grounds but does mention constitutional rights in reaching the decision. People v. Spitaleri, 9 N.Y.2d 168, 212 N.Y.S.2d 53, 173 N.E.2d 35, 86 A.L.R. 2d 322, Desmond, C. J., recognized but found it unnecessary to reach the constitutional question.
Here, upon the whole record, the trial court found the admission of the withdrawn plea of guilty "so greatly prejudiced the rights of the defendant as to deprive him of a fair trial and was consequently violative of his constitutional guarantees to due process of law." We find substantial support in the record for such an order. Consequently, following the rules stated in Division I, we affirm the court's action granting the writ of habeas corpus.[3]
V. Upon finding the writ of habeas corpus should issue the trial court merely added: "The respondent is directed to release the petitioner from custody." Such action is contra to the holdings of Birk v. Bennett, 258 Iowa 1016, 141 N.W.2d 576, 579, 580, and State v. Sefcheck, Iowa, 157 N.W.2d 128, 131, 132.
We note first that the trial court's actions were justified by the pleadings. The situation is the same as it was in Birk v. Bennett, supra, where we said: "* * * The court is limited by the record before it in the judgment it may enter and this is *151 true whether pleaded or not. Though, of course, the better practice is for the defendant to so plead and not lay a trap for the trial court, as was done here where defendant merely resisted the discharge and raised no question of holding plaintiff for the proper authorities."
Nevertheless, we then determined that where the whole record requires some action other than dismissal the court has the power and the duty to take such action. Put more bluntly, a defendant who successfully urges invasion of a constitutional right as grounds for habeas corpus is not necessarily a free man. If the sentencing court had jurisdiction to try and determine the matter in the first place this jurisdiction ordinarily remains even though an error of constitutional dimensions has occurred.
Defendant may therefore be held, or rearrested, and prosecuted on the same information or indictment. This concept is fully developed in Birk v. Bennett, supra.
The holding in State v. Sefcheck, supra, must also be recognized. On the same subject, we there said: "We hold the Lee District Court could only sustain the writ or quash it. If sustained, the Lee District Court could either order his release or return him to Story County for further proceedings there. It could not determine what those proceedings should be.
"Birk v. Bennett, supra, offers no support for defendant's position. That decision went no further than to say one whose conviction is set aside on constitutional grounds need not be unconditionally released but may be held for further proceedings which meet constitutional requirements. The fact that there such proceedings involved retrial on the original charge does not imply no other course is permissible."
It is, of course, beyond the purview of the habeas corpus court to direct the district court of original jurisdiction in its future actions. However, the habeas corpus court has the duty, in proper cases, to condition defendant's release on lack of legal action by state authorities within a reasonable time. The concluding paragraph of Birk v. Bennett, supra, is exactly apropos here:
"The judgment of the trial court should have provided for plaintiff's release unless returned to Black Hawk County within a reasonable time for trial on the original information. Inasmuch as the judgment below was not stayed we must presume plaintiff is at large. He is subject to arrest by Black Hawk County authorities at any time. The case is remanded for judgment as herein provided."
This case is similarly affirmed in part, modified in part and remanded.
LARSON, MASON, RAWLINGS and LeGRAND, J., concur.
GARFIELD, C. J., dissents from Division IV.
He does not think the claimed error in receiving evidence of a plea of guilty, although later withdrawn, entitled appellee to post-conviction relief in habeas corpus.
SNELL, MOORE and STUART, JJ., join in this dissent.
NOTES
[1]  See also the exhaustive analysis by Justice Rutledge, Wood v. United States, 75 U.S.App.D.C. 274, 128 F.2d 265, 141 A.L.R. 1318.
[2]  We also note American Bar Association, Standards Relating to Pleas of Guilty, (Tentative Draft) February, 1967, supplemented in March, 1968, section 2.2: "A plea of guilty or nolo contendere which is not accepted or has been withdrawn should not be received against the defendant in any criminal proceedings."
[3]  We do not reach the question of whether defendant's failure to appeal the criminal case constituted a voluntary knowing waiver of a constitutional right. This matter was not argued before the trial court and is not raised here.
