
33 Ill.2d 121 (1965)
210 N.E.2d 533
WILLIAM H. McDOWELL, JR., Plaintiff in Error,
v.
THE PEOPLE OF THE STATE OF ILLINOIS, Defendant in Error.
No. 38664.
Supreme Court of Illinois.
Opinion filed September 28, 1965.
*122 MITCHELL & GREEN, of Murphysboro, for plaintiff in error.
WILLIAM G. CLARK, Attorney General, of Springfield, and RICHARD E. RICHMAN, State's Attorney, of Murphysboro, (FRED G. LEACH and WILLIAM A. BOMP, Assistant Attorneys General, of counsel,) for the People.
Reversed and remanded.
Mr. CHIEF JUSTICE KLINGBIEL delivered the opinion of the court:
In 1958 William H. McDowell, Jr., then twenty-eight years of age, was charged with the crime of armed robbery. On a plea of guilty he was sentenced by the circuit court of Jackson County, under the Habitual Criminal Act, (Ill. Rev. Stat. 1957, chap. 38, par. 603.1 et seq.) to imprisonment for a term of twenty-five to forty years. In 1962 he filed this petition in the nature of a writ of error coram nobis under section 72 of the Civil Practice Act, (Ill. Rev. Stat. 1961, chap. 110, par. 72.) seeking relief also under the Post-Conviction Hearing Act (Ill. Rev. Stat. 1961, chap. *123 38, par. 826 et seq.) He claimed in substance, that he was not sane and that his constitutional rights were violated because the court failed to hold a sanity hearing before accepting the plea of guilty. After hearing evidence on this question the court denied the petition, and the petitioner seeks direct review in this court.
The evidence shows a long criminal record, frequent confinement in correctional and penal institutions, and an extensive history of antisocial behavior. It also shows a number of psychiatric examinations. In 1957 he was committed to a State hospital as a person in need of mental treatment, and after his discharge he voluntarily entered another one where he remained for twelve days. He was discharged with a diagnosis of having a sociopathic personality disturbance. No psychosis was reported. During his confinement for the present offense he was placed and retained in the psychiatric division. While several of his actions were classed as attention getting mechanisms  by his own admissions he was putting on "a bug act"  he twice attempted suicide and was found in need of psychiatric care.
Enough has been related to show that had the appropriate issue been passed on the court might well have found ground for a bona fide doubt of defendant's sanity. But the proper issue to be determined on a petition of the present kind was neither presented nor decided. The pertinent rules of law are well established. When, before or during trial, facts are brought to the attention of the court which raise a bona fide doubt of defendant's sanity a duty arises to cause a sanity hearing to be held as provided by law. (People v. Burson, 11 Ill.2d 360; Brown v. People, 8 Ill.2d 540; see also, People v. Robinson, 22 Ill.2d 162, 167.) When such facts existed at that time but the trial judge was not apprised of them, the appropriate remedy is a petition in the nature of a writ of error coram nobis pursuant to section 72 of the Civil Practice Act. (People v. Anderson, 31 Ill.2d 262; Costas v. People, 9 Ill.2d 534.) *124 The issue presented by such a petition is whether facts existed which required a hearing, not whether defendant was sane or insane, as the court undertook to decide in the case at bar. People v. Anderson, 31 Ill.2d 262.
The petition in the present case is inartfully drawn. Among other things it alleged insanity at the time of "trial" and sought to have the sentence set aside. The State did not question the sufficiency of the petition but simply denied the petitioner's allegations, and the court acquiesced in so treating the issue. After hearing evidence it found, not that a sanity hearing should have been or need not have been held but that "at the time of the arraignment and plea of guilty and sentencing of the petitioner herein, on June 30, 1958 the petitioner herein was not insane or feebleminded and that said petitioner has not since then become insane or feebleminded, and that said petitioner was competent at said time and place to enter his plea of guilty."
In this we think error was committed. Essentially the same situation was presented in the Anderson case, where both the State and defense counsel thought the issue to be decided was one of sanity or insanity, and the trial judge went along with that view. In reversing, we pointed out that the sole issue on such a petition is whether facts were present which, had they been known to the trial court, would have raised a bona fide doubt as to the defendant's sanity. If such facts are found to have existed, the relief to be granted is the impaneling of a jury to decide the question whether the petitioner at the time of pleading, was competent to do so. In brief, the question to be decided on the present petition is not whether the petitioner was sane or insane, but whether enough doubt existed to require a hearing on that question.
The judgment denying the petition is reversed and the cause is remanded to the circuit court of Jackson County for further proceedings consistent with this opinion.
Reversed and remanded.
