In February, 1962, defendant was charged by information with two assaults with a deadly weapon upon peace officers engaged in the performance of *229their duties.1 (Pen. Code, § 245, subd. (b).) The trial court appointed the public defender to represent him, and he entered pleas of guilty. On March 9, the court entered a judgment of conviction and sentenced him to prison. The trial judge and the district attorney recommended psychiatric care. (Pen. Code, § 1203.01.) Defendant did not appeal.
In January 1963, defendant, in propria persona, mailed a petition for writ of error coram nobis to the trial court.2 The petition alleges that defendant was insane at the time of the offense, but did not present this defense because he was also insane at the time of the plea. Defendant requested that he be present at the hearing and that counsel be appointed to represent him. The trial court filed the petition in August and denied these requests. It did not, however, deny the petition summarily, but set it for hearing. Defendant then wrote to the trial court repeating his requests, but no action was taken on this letter.
The hearing was continued from time to time until October 25, 1963. During this period the public defender appeared for defendant on three occasions when continuances were ordered, and assisted him in filing affidavits and a report of an examination by the prison psychiatrist. The court refused, however, to appoint the public defender to represent defendant. The People filed affidavits and a memorandum of points and authorities in opposition to the petition. When the petition finally came on for hearing, defendant was neither present nor represented by counsel. The court complimented the deputy district attorney on his memorandum of points and authorities and denied defendant’s petition. Defendant appealed, and the District Court of Appeal for the Fourth Appellate District appointed counsel to represent him. Thereafter it reversed the order and remanded the ease to the trial court with instructions to appoint counsel to represent defendant in the coram nobis proceedings. We granted the Attorney General’s petition for hearing to consider recurring questions involving the right to counsel in coram nobis eases. (See People v. Fowler, 175 Cal.App.2d 808 [346 P.2d 792]; People v. Waldo, 224 Cal.App.2d 542 [36 Cal.Rptr. 868] ; *230People v. Romano, 223 Cal.App.2d 216 [35 Cal.Rptr. 756] ; People v. Blevins, 222 Cal.App.2d 801 [35 Cal.Rptr. 438, 36 Cal.Rptr. 191] ; People v. Miller, 219 Cal.App.2d 124 [32 Cal.Rptr. 660].)
The writ of coram nobis is granted only when three requirements are met. (1) Petitioner must “show that some fact existed which, without any fault or negligence on his part, was not presented to the court at the trial on the merits, and which if presented would have prevented the rendition of the judgment.” (People v. Mendez, 28 Cal.2d 686, 688 [171 P.2d 425]; accord, People v. Tuthill, 32 Cal.2d 819, 821 [198 P.2d 505] ; People v. Reid, 195 Cal. 249, 255 [232 P. 457, 36 A.L.R. 1435].) (2) Petitioner must also show that the ‘‘newly discovered evidence . . . [does not go] to the merits of issues tried; issues of fact, once adjudicated, even though incorrectly, cannot be reopened except on motion for new trial.” (People v. Tuthill, 32 Cal.2d 819, 822 [198 P.2d 505]; accord, In re Lindley, 29 Cal.2d 709, 725-726 [177 P.2d 918]; People v. Paysen, 13 Cal.App. 396, 402 [11 P.2d 431].) This second requirement applies even though the evidence in question is not discovered until after the time for moving for a new trial has elapsed or the motion has been denied. (People v. Reid, 195 Cal. 249, 258 [232 P. 457, 36 A.L.R. 1435]; People v. Cox, 18 Cal.App.2d 283, 286 [63 P.2d 849].) (3) Petitioner “must show that the facts upon which he relies were not known to him and could not in the exercise of due diligence have been discovered by him at any time substantially earlier than the time of his motion for the writ. . . .” (People v. Shorts, 32 Cal.2d 502, 513 [197 P.2d 330]; accord, People v. Welch, 61 Cal.2d 786, 791 [40 Cal.Rptr. 238, 394 P.2d 926].)
In view of these strict requirements, it will often be readily apparent from the petition and the court’s own records that a petition for coram nobis is without merit and should therefore be summarily denied. When, however, facts have been alleged with sufficient particularity (see In re Swain, 34 Cal.2d 300, 304 [209 P.2d 793]) to show that there are substantial legal or factual issues on which availability of the writ turns, the court must set the matter for hearing. These issues may be decided on the basis of memoranda of points and authorities, affidavits, and other written reports. If the court deems additional procedures necessary to a correct determination of the issues, it may also require the presence of petitioner and other witnesses, and conduct *231the hearing like an ordinary trial. (People v. Gennaitte, 127 Cal.App.2d 544, 548-549 [274 P.2d 169]; People v. Kirk, 76 Cal.App.2d 496, 498 [173 P.2d 367].) Neither the United States Constitution nor California law, however, requires that the hearing he conducted as a formal trial. (Hysler v. Florida, 315 U.S. 411, 417 [62 S.Ct. 688, 86 L.Ed. 932]; Taylor v. Alabama, 335 U.S. 252, 263 [68 S.Ct. 1415, 92 L.Ed. 1935]; see People v. Adamson, 34 Cal.2d 320, 330 [210 P.2d 13].) It is in the light of this procedural background that we must determine when counsel should be appointed to represent an indigent petitioner.
The Attorney General contends that coram nobis is a civil remedy and that therefore appointment of counsel is not mandatory. (See People v. Fowler, 175 Cal.App.2d 808, 810 [346 P.2d 792].) Whatever the label, however, coram nobis “must be regarded as part of the proceedings in the criminal case ...” (In re Paiva, 31 Cal.2d 503, 510 [190 P.2d 604]), and it is an established remedy for challenging a criminal conviction. (See id, at p. 505; In re Horowitz, 33 Cal.2d 534, 537 [203 P.2d 513]; 51 Cal.L.Rev. 970, 978.) It is now settled that whenever a state affords a direct or collateral remedy to attack a criminal conviction, it cannot invidiously discriminate between rich and poor. An indigent defendant is entitled to an adequate record on appeal not only from a judgment of conviction (Griffin v. Illinois, 351 U.S. 12 [76 S.Ct. 585, 100 L.Ed. 891, 55 A.L.R.2d 1055]; Eskridge v. Washington State Board etc. Paroles, 357 U.S. 214 [78 S.Ct. 1061, 2 L.Ed.2d 1269] ; Draper v. Washington, 372 U.S. 487 [83 S.Ct. 774, 9 L.Ed.2d 899], but from the denial of a petition for a writ of coram nobis (Lane v. Brown, 372 U.S. 477 [83 S.Ct. 768, 9 L.Ed.2d 892] ; see McCrary v. Indiana, 364 U.S. 277 [80 S.Ct. 1410, 4 L.Ed.2d 1706]). Although the United States Supreme Court has not held that due process or equal protection requires appointment of counsel to present collateral attacks on convictions, it has held that counsel must be appointed to represent the defendant on his first appeal as of right. (Douglas v. California, 372 U.S. 353 [83 S.Ct. 814, 9 L.Ed.2d 811].) Since the questions that may be raised on coram nobis are as crucial as those that may be raised on direct appeal, the Douglas case precludes our holding that appointment of counsel in coram nobis proceedings rests solely in the discretion of the court.
*232A state may, however, adopt reasonable standards to govern the right to counsel in coram nobis proceedings. [H] These standards may preclude absolute equality to the indigent, but, as the United States Supreme Court pointed out in the Douglas case, absolute equality is not required; only “invidious discrimination” denies equal protection. (Douglas v. California, 372 U.S. 353, 356-357 [83 S.Ct. 814, 9 L.Ed.2d 811].) Thus, in In re Nash, 61 Cal.2d 491, 496 [39 Cal.Rptr. 205, 393 P.2d 405], we held that an appellant was not subject to invidious discrimination when neither his appointed counsel nor the District Court of Appeal could discover a meritorious ground of appeal and the court refused to appoint another counsel to represent him. In habeas corpus cases we require a convicted defendant to allege with particularity the facts upon which he would have a final judgment overturned and to disclose fully his reasons for any delay in the presentation of those facts. (In re Swain, 34 Cal.2d 300, 304 [209 P.2d 793].) We then examine his allegations in the light of any matter of record pertaining to his case (see California Rules of Court, rule 60) to determine whether a hearing should be ordered. We recognize that these rules, applicable as well to petitions for coram nobis, place indigent petitioners in a less advantageous position than those with funds to retain counsel and employ investigators. It bears emphasis, however, that the ordinary processes of trial and appeal are presumed to result in valid adjudications. Unless we make the filing of adequately detailed factual allegations stating a prima facie case a condition to appointing counsel, there would be no alternative but to require the state to appoint counsel for every prisoner who asserts that there may be some possible ground for challenging his conviction. Neither the United States Constitution nor the California Constitution compels that alternative. Accordingly, in the absence of adequate factual allegations stating a prima facie case, counsel need not be appointed either in the trial court or on appeal from a summary denial of relief in that court.
When, however, an indigent petitioner has stated facts sufficient to satisfy the court that a hearing is required, his claim can no longer be treated as frivolous and he is entitled to have counsel appointed to represent him. If relief is denied after the hearing, he is entitled to counsel on appeal subject to the limitations set forth in the Nash case, supra, 61 Cal.2d 491, for the issues involved may be as sub*233stantial as those that may be raised on appeal from a judgment of conviction.3
In the present case, the trial court found that a hearing was required. Defendant admits shooting two police officers who were questioning him in connection with his abandoned car, but contends that he was “hopped up” on benzedrine tablets and that he had slept for only brief periods during the preceding nine days. Hence, defendant contends, he was legally insane at the time of the crime. He alleges that he failed to present the defense of insanity because he was also insane at the time that he pleaded guilty. These allegations are supported by sworn statements from associates that defendant customarily drugged himself heavily with benzedrine and that he suffered from delusions of police persecution. The report of the prison psychiatrist also concludes that defendant was suffering from a toxic psychosis because of massive overdoses of benzedrine and that this toxic state existed prior to and during the acts for which he was convicted.
Although the psychiatrist’s report easts some doubt on whether the effects of the drug were present at the time defendant pleaded guilty, we cannot say that the trial court erred in setting the petition for hearing. Defendant’s allegations, if true, would meet the requirements for a writ of coram nolis. His legal sanity at the time of the crime is a material question that was neither put in issue nor tried. (Pen. Code, §1016; People v. Welch, 61 Cal.2d 786, 794 [40 Cal.Rptr. 238, 394 P.2d 926].) Furthermore, if he was incapable of participating in the formulation of his defense, defendant may have failed to present facts supporting an insanity plea through no fault of his own. Finally, the petition was presented within 10 months from the judgment, and we cannot say that defendant was not diligent in discovering the facts upon which he relies.
The order denying coram nolis is reversed and the cause *234remanded with instructions to appoint counsel and proceed with a hearing on the merits of the petition.
McComb, J., Peters, J., Tobriner, J., Peek, J., Burke, J., and Schauer, J.,* concurred.
Charges, based on the same events, that defendant committed two assaults with intent to kill (Pen. Code, § 217), were dismissed. The information also charged, and defendant admitted, a prior felony conviction.
In California, this petition is the equivalent of a motion to vacate the judgment. (See People v. Tuthill, 32 Cal.2d 819, 821 [198 P.2d 505].)
To the extent that People v. Fowler, 175 Cal.App.2d 808 [346 P.2d 792], People v. Waldo, 224 Cal.App.2d 542 [36 Cal.Rptr. 868], People v. Blevins, 222 Cal.App.2d 801 [35 Cal.Rptr. 438, 36 Cal.Rptr. 199], and People v. Miller, 219 Cal.App.2d 124 [32 Cal.Rptr. 660], involved petitions that did not state facts sufficient to require a hearing, they are not inconsistent with this opinion. To the extent that they suggest that the appointment of counsel is always discretionary, they are disapproved. People v. Romano, 223 Cal.App.2d 216 [35 Cal.Rptr. 756], is likewise disapproved.
Retired Associate Justice of the Supreme Court sitting under assignment by the Chairman of the Judicial Council.