
2 Cal.3d 141 (1970)
465 P.2d 257
84 Cal. Rptr. 361
In re PETER JOSEPH LOPEZ on Habeas Corpus.
Docket No. Crim. 13485.
Supreme Court of California. In Bank.
March 2, 1970.
*144 COUNSEL
Edward J. Horowitz, under appointment by the Supreme Court, for Petitioner.
Thomas C. Lynch, Attorney General, Doris H. Maier, Assistant Attorney General, and Arnold O. Overoye, Deputy Attorney General, for Respondent.
OPINION
MOSK, J.
Petitioner, Peter Joseph Lopez, is confined for treatment as a narcotics addict in the California Men's Colony at Los Padres pursuant to civil commitment proceedings under former section 6450 of the Penal Code, now Welfare and Institutions Code section 3050. We issued an order to show cause in response to his petition in propria persona for a writ of habeas corpus to consider the contention that his present civil commitment is based on an underlying misdemeanor conviction obtained in violation of his right to counsel. We conclude that the writ of habeas corpus must be granted.
On February 25, 1964, petitioner appeared without counsel in the Alhambra Municipal Court and pleaded guilty to the misdemeanor of using and being under the influence of narcotics in violation of section 11721 of the Health and Safety Code. Pursuant to former section 6450 of the Penal Code,[1] proceedings in the municipal court were suspended before *145 the entry of judgment, and petitioner was certified to the Los Angeles Superior Court to determine if he was addicted to narcotics or in imminent danger of addiction. He was arraigned in superior court on March 24, 1964, and the hearing to determine his addiction was set for April 1. The court appointed two doctors to examine him and report to the court, and the public defender was appointed to represent him.
At the April 1 hearing, the court found that he was a narcotics addict and ordered him committed to the custody of the Department of Corrections for treatment in the narcotics addict rehabilitation program.[2] Petitioner then demanded a jury trial, which was set for April 27, 1964. At the trial, petitioner, represented by retained counsel, waived a jury, and trial before the court resulted in a finding that he was a narcotics addict. The court ordered him committed in accordance with the commitment order made on April 1.
Petitioner's petition for habeas corpus raises three interrelated issues concerning the constitutionality of his conviction in municipal court and the validity of his subsequent commitment to the narcotics addict rehabilitation program. Petitioner contends that he was not informed of his right to counsel and that his request for court-appointed counsel was rejected in the criminal proceedings before the municipal court; that, in any event, he did not waive his right to counsel; and that the unconstitutionality of the underlying conviction vitiates his subsequent commitment under Welfare and Institutions Code section 3050.
(1) Under article I, section 13, of the California Constitution,[3] "there can be no doubt that the fundamental constitutional right to the assistance of counsel at all stages of the proceedings (see Gideon v. Wainright [sic] *146 (1963) 372 U.S. 335 ...) is ... not limited to felony cases but is equally guaranteed to persons charged with misdemeanors in a municipal or other inferior court." (In re Johnson (1965) 62 Cal.2d 325, 329 [42 Cal. Rptr. 228, 398 P.2d 420].) (2) To implement this constitutional guarantee, the criminal courts are required to inform each defendant of his right to counsel, inquire if the defendant desires the assistance of counsel, and appoint counsel for any defendant who desires but is unable to employ counsel. (Pen. Code, §§ 858, 859, 987; In re Johnson (1965) supra, 62 Cal.2d 325, 329, and fn. 2.)
In the case at bar, petitioner contends that he was not informed of his right to counsel and that his request for court-appointed counsel was rejected by the trial judge. The truth of these allegations cannot be verified readily because no reporter was present in the Alhambra Municipal Court on February 25, 1964.[4] (3a) Nevertheless, the municipal court's docket entry is some indication of what occurred, and it notes that petitioner appeared "in court without counsel," that he was "duly arraigned, complaint read to him and he is advised of his constitutional rights and gives his true name as charged. Defendant pleads guilty and waives time for sentence." (4) Because there is a presumption that in preparing the docket entry official duty was regularly performed (Evid. Code, § 664), "on collateral attack such an entry must ordinarily be deemed to speak the truth." (In re Johnson (1965) supra, 62 Cal.2d 325, 330.) (3b) Therefore, the entry recited above establishes that petitioner did in fact plead guilty without counsel, but that he was informed of his constitutional rights prior to entering his plea.
A question remains whether the recitation of rights to petitioner included an adequate discussion of his right to court-appointed counsel. We answered an identical question in In re Johnson by referring to an affidavit of the arraigning judge which described the custom and practice in his court in dealing with the right to counsel. (5) In the instant action, Judge Lothrop E. Smith, who presided at petitioner's arraignment, has provided us with a similar affidavit: "Although I have no independent recollection of the case of Peter Joseph Lopez, I do recall my invariable practice prevailing at the time of petitioner's conviction.... My practice was to inform all defendants of their right to the assistance of counsel at all stages of the proceedings. If a defendant requested but was unable to afford counsel, I would invariably appoint counsel to assist him in the municipal court proceedings." Judge Smith's affidavit is persuasive evidence that petitioner was advised of his right to the services of court-appointed counsel prior to the court's acceptance of his guilty plea and is sufficient to refute petitioner's bare allegation *147 that his request for appointed counsel was denied by the court. (In re Tucker (1966) 64 Cal.2d 15, 18 [48 Cal. Rptr. 697, 409 P.2d 921]; In re Luce (1966) 64 Cal.2d 11, 13-14 [48 Cal. Rptr. 694, 409 P.2d 918].)
Thus, we reject petitioner's first contention that he was not informed of his right to counsel and that his request for counsel was denied. (6) But the undeniable fact remains that he was not represented by counsel when he pleaded guilty, and the right to counsel is violated whenever a defendant is convicted of a criminal offense without counsel, unless he has intelligently and understandingly waived his right. (Carnley v. Cochran (1962) 369 U.S. 506 [8 L.Ed.2d 70, 82 S.Ct. 884]; In re Johnson (1965) supra, 62 Cal.2d 325, 333-334.) Therefore, we must determine whether at any point in the proceedings petitioner effectively waived his constitutional right to counsel.
As in In re Johnson, "[t]here is no contention that petitioner ever expressly declared that he waived his right to counsel, and the record is devoid of any such declaration. On the contrary, it appears [from the docket entry] that when it came petitioner's turn to stand before the bench the judge proceeded directly to the arraignment, reading off the charges and asking petitioner how he pleaded." (62 Cal.2d at p. 333.) In Johnson, relying on authoritative federal and state cases, we held that neither a defendant's failure to request court-appointed counsel nor his pleading guilty could constitute an implied waiver of his right to counsel. (Id. at pp. 333-334.) "Where, as here, petitioner neither expressly declined nor discharged counsel but merely responded `Guilty' to the court's question of how he pleaded, there is nothing in the record which remotely intimates that he thereby made an intelligent and understanding waiver of his constitutional right to counsel." (Id. at p. 334.)
(7a) Apparently the People would have us infer a waiver from a silent record and suggest it is petitioner's burden to show that he did not waive his right to counsel. But casting such burden on the accused was expressly rejected by the United States Supreme Court in Carnley v. Cochran (1962) supra, 369 U.S. 506, 514 [8 L.Ed.2d 70, 76, 82 S.Ct. 884], in which the court held that "[p]resuming waiver from a silent record is impermissible. (8) The record must show, or there must be an allegation and evidence which show, that an accused was offered counsel but intelligently and understandingly rejected the offer. Anything less is not waiver." (Id. at p. 516 [8 L.Ed.2d at p. 77].) (7b) It is clear that the record before us falls far short of meeting the foregoing test of determining a valid waiver. Nor does the petitioner's prior exposure to the criminal process justify our reading into his guilty plea the necessary intelligent waiver. Therefore, we hold that petitioner was denied his constitutional right to counsel and that his conviction on a guilty plea was invalid.
*148 Because petitioner is being held pursuant to a civil commitment which followed his conviction, invalidating the criminal conviction does not per se satisfy his petition for habeas corpus. (9) We necessarily reach the question whether an invalid criminal conviction vitiates an otherwise valid civil commitment ordered pursuant to section 3050 of the Welfare and Institutions Code. We conclude that it does.
In the case of In re De La O (1963) 59 Cal.2d 128 [28 Cal. Rptr. 489, 378 P.2d 793, 98 A.L.R.2d 705], we initially examined the constitutionality of the provisions of the narcotics addict rehabilitation program. Like the petitioner in the case at hand, the petitioner in De La O sought a writ of habeas corpus from his commitment under Penal Code section 6450. In the course of our opinion, we discussed the relevance of the criminal conviction which preceded the petitioner's commitment: "We recognize at once that an essential part of the procedural foundation for petitioner's current restraint is his conviction of violating Health and Safety Code section 11721. We note also that petitioner's `status' or `chronic condition' of being ... unlawfully `addicted to the use of narcotics' ... is considered to constitute a sufficient ground for conviction of violating section 11721 and therefore to prima facie establish the status of eligibility for initiation of the procedures contemplated by Penal Code section 6450." (Id. at p. 136.) "Obviously, one who has been convicted of violating ... Health and Safety Code section 11721, on any tenable interpretation of its language, has at least demonstrated some history of illegal narcotics use. As a basis for consideration for the civil and remedial procedures delineated by section 6450, conviction of any violation of section 11721 is sufficient." (Id. at p. 152.)
Thus, as early as 1963, criminal conviction under section 6450 was viewed as an essential procedural foundation for the subsequent commitment proceedings and as prima facie evidence necessary to establish eligibility for initiation of commitment proceedings. Such an opinion of the procedural significance of the criminal conviction lends support to petitioner's contention here that the nullifying of his conviction should invalidate his subsequent commitment under section 6450.
Further support for petitioner's position is found in our recent decision of In re Bevill (1968) 68 Cal.2d 854 [69 Cal. Rptr. 599, 442 P.2d 679]. In that case, we examined section 5501 of the Welfare and Institutions Code which provided for the civil commitment of mentally disordered sex offenders.[5] Although the commitment procedures for sex offenders vary significantly *149 in certain respects from those for narcotics addicts, sections 6302 and 3050 would appear to be strikingly similar in both language and purpose. In Bevill, we held that a petitioner whose conviction of a sex crime was invalid was entitled to release from his commitment as a mentally disordered sex offender. "Since the efficacy of his commitment was undermined by the deficiency of his conviction, a writ of habeas corpus must be granted ordering his discharge." (68 Cal.2d at p. 863.)
In reaching our conclusion in Bevill, we looked to the structure of the statute and emphasized the "continuing relation foreseen to exist between commitment and conviction." (Id. at p. 861.) An almost identical continuing relationship exists between the conviction and commitment under the narcotics addict rehabilitation scheme. In both the sex and narcotics programs, the criminal proceedings are adjourned when commitment proceedings commence; if the subject is immediately determined not to be a sex offender or an addict, he is returned to the criminal court and criminal proceedings are resumed; if the subject is found not to be amenable to treatment, he is returned to the criminal court for sentencing; and time spent under commitment is credited in fixing the criminal sentence. (See id. at p. 861.)
The People contend that the analogy to Bevill breaks down at a critical point. They point out that the mentally disordered sex offender program makes no provision for civil commitment of persons not convicted of a crime, while the narcotics addict rehabilitation program provides for commitment of nonconvicted persons on the same terms as commitment of convicted persons.[6] Therefore, the People reason, criminal conviction is of little or no procedural significance in the narcotics addict program because addicts committed upon a faulty conviction could have been committed without the conviction in the first instance. They conclude that petitioner should not be released from his civil commitment merely because the preceding conviction was unconstitutionally obtained, since petitioner could *150 have been committed to the program under Penal Code section 6500 without conviction.
The People's contention, though persuasive at first glance, does not survive analytical scrutiny. In People v. Victor (1965) 62 Cal.2d 280 [42 Cal. Rptr. 199, 398 P.2d 391], we examined the relationship between Penal Code sections 6450 and 6500 in the course of our opinion holding that the superior court lacked jurisdiction to commit a defendant under section 6500 after judgment of conviction of a crime had been entered against him and while he was confined in jail as a condition of probation. While we reasoned that no justification existed for a difference in commitment procedures for persons convicted of crime and those who were not so convicted, we emphasized the importance of retaining the legislatively imposed differences in the standards of general eligibility for the rehabilitation program. (62 Cal.2d at p. 291 and fn. 5.) We explicitly rejected the contention there that the section 6500 commitment was proper despite the fact that defendant had been convicted of a crime: "The Attorney General urges that it was nevertheless proper to commit defendant pursuant to article 3 (Pen. Code, §§ 6500-6510). The position is untenable.... The commitment mechanisms provided in article 2 [Pen. Code, §§ 6450-6453] and article 3 must be deemed to be mutually exclusive: if the facts warrant proceeding under article 2  i.e., if the defendant has pleaded or been found guilty of a crime but sentence has not yet been imposed  the court must exercise its discretion under that article; it may not fail to do so and then remedy the oversight by belated recourse to the procedure sent [sic] up by article 3. Any other construction would obliterate for all purposes the distinctions drawn by the Legislature in enacting the separate commitment procedures of article 2 and article 3.... It is no answer to say, as does the Attorney General, that the district attorney could simply await the defendant's release from custody under the criminal conviction before filing a petition pursuant to article 3. Whenever it may be filed, such a petition must relate to conduct sufficiently recent to support a bona fide belief that the person named therein is currently addicted or in imminent danger of addiction." (Id. at pp. 294-295 and fn. 11.)
Our language in Victor remains persuasive authority. We held that a belated recourse to section 6500 could not be used as a substitute for a section 6450 commitment, and that each commitment procedure was independent of the other and had to meet its own eligibility requirements. The requirement under Penal Code section 6450 and now Welfare and Institutions Code section 3050 is a criminal conviction, and the fact that a person who is not convicted of crime might be committed upon probable cause does not minimize the significance of the original procedural requirement.
*151 Our literal reading of the code sections in Victor was bolstered by our earlier decision in In re Raner (1963) 59 Cal.2d 635 [30 Cal. Rptr. 814, 381 P.2d 638]. There we emphasized the importance of careful attention to the statutory language of the code sections authorizing civil commitment of narcotics addicts: "`The commitment procedures set up by the subject statute are in the nature of special civil proceedings unknown to the common law....' Being a creature of statute, jurisdiction to enter an order of commitment pursuant thereto depends on strict compliance with each of the specific statutory prerequisites for maintenance of the proceeding." (Id. at p. 639.) (10) It follows, therefore, that the words "upon conviction" in section 3050 should be read to express an essential jurisdictional prerequisite to a valid commitment under that section, and we so hold.
(11) Because we hold that the validity of a commitment as a narcotics addict is affected by the validity of the prerequisite criminal conviction, habeas corpus is an appropriate remedy to review issues pertaining to the conviction insofar as they test the legality of the present confinement. In so holding, we do not broaden the classic limitations upon the writ of habeas corpus in this state. (12) "`[H]abeas corpus cannot serve as a substitute for an appeal, and, in the absence of special circumstances constituting an excuse for failure to employ that remedy, the writ will not lie where the claimed errors could have been, but were not, raised upon a timely appeal from a judgment of conviction.'" (In re Shipp (1965) 62 Cal.2d 547, 552 [43 Cal. Rptr. 3, 399 P.2d 571], quoting In re Dixon (1953) 41 Cal.2d 756, 759 [264 P.2d 513].)[7] However, denial of the right to counsel is one trial error which has always been cognizable on habeas corpus. (Gideon v. Wainwright (1963) supra, 372 U.S. 335; In re Johnson (1965) supra, 62 Cal.2d 325.
The writ is granted and petitioner is discharged from custody.
Tobriner, Acting C.J., Peters, J., Burke, J., and Sullivan, J., concurred.
McCOMB, J.
I dissent. I would deny the writ.
NOTES
[1]  The statutory sections relating to civil commitment proceedings against narcotics addicts have undergone several amendments since 1964. The current provisions appear in Welfare and Institutions Code sections 3000 to 3306. However, the general contours of the civil commitment program remain as they were in 1964. Now, as in 1964, criminal proceedings are adjourned and probable addicts are certified to the superior court for civil commitment proceedings; doctors testify at the superior court hearing and a determination is made whether the defendant is an addict; if he is found to be an addict or "in imminent danger" of addiction, he is committed to the program for rehabilitation; dissatisfied defendants may demand a jury trial.

Although section 3050 of the Welfare and Institutions Code has replaced section 6450 of the Penal Code and contains more precise procedural requirements, the relevant language of the two sections is identical: "Upon conviction of a defendant of any crime in a municipal or justice court, if it appears to the judge that the defendant may be addicted or by reason of repeated use of narcotics may be in imminent danger of becoming addicted to narcotics, such judge shall adjourn the proceedings or suspend the imposition of sentence [and] certify the defendant to the superior court...." Therefore, unless significant differences appear between the present statutes and those in force at the time of the proceedings against petitioner, we refer hereinafter to the civil commitment statutes as they appear today.
[2]  The program involves an initial confinement in a narcotic detention, treatment and rehabilitation facility for no less than six months. After that time, persons are eligible for release on outpatient status during which they are closely supervised, tested for narcotics use, and may be returned to the facility if "it is for the best interests of the person and society that this be done." (See Welf. & Inst. Code, §§ 3151, 3152.) Persons who abstain from narcotics use in outpatient status for three consecutive years are released from the program and returned to the municipal court for disposition of the original conviction. If the original charges are not dismissed, the defendant receives credit in sentencing for time served while under commitment. Except in extraordinary circumstances, the maximum period of commitment under the program is seven years. (See Welf. & Inst. Code, §§ 3200, 3201.)
[3]  Article I, section 13, of the California Constitution provides in relevant part: "In criminal prosecutions, in any court whatever, the party accused shall have the right ... to appear and defend, in person and with counsel."
[4]  The Attorney General informs us that "no reporter is present in the Municipal Court, Alhambra Judicial District."
[5]  Section 6302 of the Welfare and Institutions Code, formerly section 5501, provides in part as follows: "When a person is convicted of any criminal offense, whether or not a sex offense, the trial judge, on his own motion, or on motion of the prosecuting attorney, or on application by affidavit by or on behalf of the defendant, if it appears to the satisfaction of the court that there is probable cause for believing such a person is a mentally disordered sex offender within the meaning of this chapter, may adjourn the proceeding or suspend the sentence, as the case may be, and may certify the person for hearing and examination by the superior court of the county to determine whether the person is a mentally disordered sex offender within the meaning of this article."
[6]  Section 3100 of the Welfare and Institutions Code provides: "Anyone who believes that a person is addicted to the use of narcotics or by reason of the repeated use of narcotics is in imminent danger of becoming addicted to their use or any person who believes himself to be addicted or about to become addicted may report such belief to the district attorney, under oath, who may, when there is probable cause, petition the superior court for a commitment of such person to the Director of Corrections for confinement in the narcotic detention, treatment and rehabilitation facility."

Section 6500 of the Penal Code was identical to the above except that the words "under oath" and "when there is probable cause" did not appear.
[7]  As to the review of such errors on appeal, see People v. Murphy (1969) 70 Cal.2d 109 [74 Cal. Rptr. 65, 448 P.2d 945].
