
259 N.W.2d 789 (1977)
STATE of Iowa, Appellee,
v.
Herman EVANS, Appellant.
No. 59282.
Supreme Court of Iowa.
November 23, 1977.
Philip M. Reisetter of Iowa City, and Thomas P. Curran of Minneapolis, Minn., for appellant.
Richard C. Turner, Atty. Gen., J. Susan Carney, Asst. Atty. Gen. and Jack W. Dooley, Johnson County Atty., for appellee.
Heard by MOORE, C. J., and RAWLINGS, REES, UHLENHOPP and McCORMICK, JJ.
UHLENHOPP, Justice.
This appeal involves guilty-plea proceedings on a charge of malicious injury to a *790 building. Defendant Herman Evans suffers from schizophrenia with manic depressive components. At times, especially when off medication, he loses touch with reality and suffers severe mood problems.
Defendant has a history of being in and out of mental health institutions and of some criminal activity. On November 20, 1975, neighbors made a complaint to the Iowa City police that defendant was creating a disturbance at an apartment. When the police arrived, defendant was shouting and muttering incoherently, and the police observed burning papers against a door. They took defendant to the station house where, during booking, defendant held a plastic evidence envelope over a burning lighter "to form a light like a falling star."
As a result of the latter incident the county attorney charged defendant with attempting to burn the booking room. The officers placed defendant in jail, where he tore a lavatory and a commode from their moorings.
The trial court appointed an attorney for defendant, and thereafter entered an order reciting that defendant "committed acts of arson and vandalism while within the confines of the Jail, such as to bring into serious doubt Defendant's sanity at this time" and transferring defendant to Iowa Security Medical Facility (ISMF) for psychiatric examination, evaluation, and treatment and for return upon completion.
On January 21, 1976, ISMF through Dr. R. T. Lara reported to the court. We quote portions of the report:
Mr. Evans is well known to the local authorities and to all psychiatric hospitals in the area. In a true sense, he is a chronic community problem. In July, 1974, he was discharged from this faculty as suffering from paranoid schizophrenia with depressive components. It was recommended that he be civilly committed to a V.A. setting. At that time, it was already appreciated that Mr. Evans was not only chronically mentally ill, that his present wife, Dee, condoned and fostered his illness. . . .
On admission, Mr. Evans was inaccessible to interview. He was a well-muscled, sinewy man who wore earrings. He kept hopping from foot to foot and leaped atop the commode. He proclaimed that today was "Judgment Day." Very quickly, he was placed on anti-psychotic medications, and he responded predictably. He was preoccupied with the question of which came first, a chicken or an egg? Only he had the answer. When prodded, he solemnly replied, "a rooster." . . .
After two weeks, a leaden curtain of depression came over him. Although there was evidence of depression on his last admission, it had not been as severe as this, nor was it as recalcitrant to chemotherapy. Insofar as he still had to appear in criminal court, we avoided the use of shock treatments. This would be clinically beneficial, but could present problems of possible amnesia when it comes to cooperating with his counsel in discussing the allegations.
Despite that, there has been slow but noticeable improvement. As again, the gamut of our tests show him to be a physically healthy man. Our present psychological tests are comparable to that of his last which show him to have an IQ of 83, placing him in the dull normal range of intelligence. The battery of tests support our clinical observations of a thinking and a mood disorder, the latter more pronounced on this admission. It would appear that Mr. Evans has presented different facets of his illness to different institutions. If only for classification purposes, this condition is probably best subsumed by the diagnosis of Schizophrenia, schizo-affective type, APA Code 295.7, with paranoid features.
Although still ill, he has sufficiently remitted to be again competent for trial. He understands the nature of the proceedings against him and is able to cooperate with his counsel in his defense.
It is our considered opinion that his capability to distinguish right from wrong at that critical time [apparently at time of alleged crime] was impaired by reason of mental illness. He had an *791 awareness of what he was doing, but this was most superficial. His judgment and recognition of the consequences of his behavior were gone. As an example, this examiner has seen him set a match to his fallen hair which he had collected in a small mat. He was utterly oblivious to the social context in which he did this.. . .
He is being returned as being reasonably remitted for trial to continue. He is being discharged on Haldol, 16 mgs. daily; Congentin, 2 mgs. daily, and Flavil, also 200 mgs. daily.
The defense attorney appointed by the trial court investigated the case and recommended that defendant plead not guilty to the charge of attempted burning. Defendant, however, insisted on pleading guilty. On January 26, 1976, defendant tendered a guilty plea, but after a hearing the trial court refused to accept it.
On January 30 following, the county attorney dismissed the attempted burning charge and charged defendant with malicious injury to the jail. Defendant was unable to make bail on the charge, and the officers believed that the jail was not equipped to handle him. The Veterans Administration hospital located in Iowa City would only accept defendant if committed under the Iowa statute on civil commitment of mentally ill persons (see Code 1977, ch. 229). Defendant was so committed and placed in that hospital on February 2, 1976. Subsequently the hospital placed defendant on outpatient basis but did not discharge him.
On February 5, 1976, the trial court arraigned defendant on the malicious injury charge. Defendant again insisted on pleading guilty against his attorney's advice. The trial court conducted a lengthy hearing and extensively interrogated defendant. The court then accepted the plea, ordered a presentence investigation, subsequently passed sentence, and committed defendant to the penitentiary.
Defendant later moved in arrest of judgment. He did not attend the hearing on that motion, as the deputy sheriff who went to the penitentiary to transport him could not get him to leave his cell. The deputy testified:
Q. Did he appear rational to you? A. The man definitely had a problem. . . At first he wasn't aware who I was. After I stood and talked to him about myself for awhile I thought at one point I possibly had him just to the point where he would startwould maybe start cooperating a little bit and possibly come back to Iowa City with me. One of his counselors walked in and after about five minutes in the presence of his counselor it was out of the question because he went into an outrage at that time.
Q. You couldn't communicate with him? A. No, not after that, no. He was yelling and shaking his fist and stuff like that, no way possible.
Dr. Lara among others testified at the hearing on the motion in arrest. He was of the opinion that defendant could stand trial. He also acknowledged, however, the contents of his report from which we have quoted. Dr. Richard Fowler of the Veterans Administration Hospital also testified at the hearing on the motion. He had known defendant from four or five previous hospital admissions. Dr. Fowler engages in medical care of psychiatric patients, research, and teaching medical students. His diagnosis of defendant was manic depressive illness. He testified inter alia regarding defendant, "He has also stated a belief at times when he's been quite active that he is a religious figure who has been directed by God to save the world." He also testified, in part:
Q. Would he [defendant]was it characteristic of him to go from control back into heightened illness again? A. Yes. The course of his illness was totally unpredictable. He would be hospitalized, placed on medication, would look reasonably stable, and then following his discharge would usually relapse following a variable period of time.
Q. Was there any pattern of regularity as to Mr. Evans' illness and remission?. . . A. It was not predictable except *792 that there is always a greater likelihood he was going to have trouble when he stopped his medication. . . .
Q. Do you recall that during the course of our conversation that I asked you to consider on the basis of your professional contact with Mr. Evans whether you had doubts as to his competency to stand trial during the period, February, March, 1976? A. I told you I would have doubts about his ability to stand trial. . . .
Q. Is it your opinion, Doctor, then, that based on these specific questions I've just gone over with you that I've asked you to consider and based on your experience and dealings with Mr. Evans that you would have doubts as to his ability to cooperate with counsel at trial? A. Yes.
The record contains considerable other testimony touching upon defendant's mental ability to stand trial, some favorable and some unfavorable.
The trial court overruled the motion in arrest. In this court defendant assigns a number of errors, but in view of our disposition of the case we decide only one of the assignments.
I. Section 783.1 of the Code provides:
If a defendant appears at any stage of the trial of a criminal prosecution, and a reasonable doubt arises as to his sanity, further proceedings must be suspended and a trial had upon that question.
Proceedings upon a guilty plea constitute "any stage of the trial of a criminal prosecution" within this section. Hickey v. District Court of Kossuth County, 174 N.W.2d 406 (Iowa). In prosecutions such as the present one, the legislature has not entrusted judges or physicians with the ultimate determination of whether a defendant is competent to stand trial, but has rather left that decision to juries. § 783.2; Hickey v. District Court of Kossuth County, supra. The judge's function is a preliminary one: to ascertain whether a reasonable doubt has arisen as to sanity. If so the judge must order a jury trial on that issue. 21 Am.Jur.2d Criminal Law § 68 at 150; 23 C.J.S. Criminal Law § 940 at 730. The judge must act on his own motion in instances where a reasonable doubt arises as to the defendant's sanity. State v. Stoddard, 180 N.W.2d 448 (Iowa).
This court set out the rules on the present subject in the Hickey case: initially the trial court exercises its discretion on whether a reasonable doubt has arisen so as to necessitate a jury trial on sanity, but its discretion "is a judicial discretion and must be guided by the law so as to do substantial equity and justice," Hickey, supra, 174 N.W.2d at 409; "sanity," under § 783.1, "is defendant's mental capacity to appreciate the charge against him, understand the proceedings, and conduct his defense," id.; a judge has a "reasonable doubt" when his mind "is left in such a condition that he cannot honestly say he feels an abiding conviction to a moral certainty as to the truth of a matter," id.; and the reasonable doubt question must be answered "by a consideration of all the facts and circumstances obtained from reasonably trustworthy sources and which are in themselves sufficient to warrant a man of reasonable caution to believe the accused in a criminal matter can or cannot appreciate the charge against him, understand the proceedings, and help conduct his defense," id. 174 N.W.2d at 410.
The trial court found that a reasonable doubt as to defendant's sanity did not exist. Upon examination of the entire record on the issue, we are constrained to hold that this finding cannot stand. We hold on this record that the question of defendant's competency to appreciate the charge, to understand the proceedings, and to help conduct the defense should have been submitted to a jury for determination. Hickey v. District Court of Kossuth County, supra; State v. Bordovsky, 183 N.W.2d 170 (Iowa). The trial court should not have accepted the guilty plea or gone forward with the guilty-plea proceedings unless and until a jury found defendant competent, but having gone forward with the guilty plea, the trial court should have sustained the subsequent motion in arrest.
*793 II. The conclusion we have reached renders consideration of defendant's other assignments unnecessary. As to defendant's last assignment we will say, however, that criminal proceedings including a conviction, if a conviction occurs, cut across civil commitment proceedings. The civil commitment chapter contemplates that criminal proceedings may occur. Code 1977, § 229.20. See In the Matter of Cawley, 369 Mich. 611, 120 N.W.2d 816; State v. Hagerty, 152 Minn. 502, 189 N.W. 411.
Defendant's guilty plea and the proceedings thereon are of no effect. We return the case to district court for jury trial under § 783.1.
REVERSED AND REMANDED.
