
38 Cal.2d 302 (1952)
In re O. D. JAMES, on Habeas Corpus.
Crim. No. 5243. 
Supreme Court of California. In Bank.  
Jan. 22, 1952.
 Adams & Reynolds for Petitioner.
 Edmund G. Brown, Attorney General, and Clarence A. Linn, Assistant Attorney General, for Respondent.
 TRAYNOR, J.
 Petitioner, O. D. James, an inmate of San Quentin State Prison, seeks a writ of habeas corpus. He pleaded guilty to a charge of murder. The court determined that the crime was first degree murder and sentenced petitioner to imprisonment for life. Petitioner now contends that his constitutional rights were violated and his plea of guilty vitiated because he was not given the aid of counsel.
 Petitioner's version of the events leading to the homicide are set forth in his affidavit. On December 2, 1944, a number of farm workers were engaged in a dice game at the canteen on the ranch where they worked. Petitioner and Charlie Thomas, the decedent, were watching the game awaiting their turns with the dice. Petitioner placed 55 cents in front of him on the table in anticipation of hazarding that sum when he gained possession of the dice. Thomas, who had not previously *305 wagered any money and had no claim to the coins, suddenly snatched them. Petitioner demanded that Thomas return the money. They argued for about a minute and Thomas then ran out a side door. At this point a bell rang summoning the workers to supper. With the triple purpose of avoiding the rush for the front door, responding to the supper bell, and looking for Thomas, petitioner walked out the side door previously used by Thomas. Thomas was waiting outside, and petitioner again demanded his 55 cents. Thomas thereupon struck petitioner on the head with a beer bottle, stunning him and inflicting a bloody scalp wound. Petitioner staggered back and reached down to pick up his cap. As he did so he heard a shout "Look out" and saw that Thomas was bearing down upon him with a knife. In the struggle that followed, petitioner's hand was slashed and is now marked by a large scar. He seized the knife and struck Thomas in the neck, killing him. After his wounds were attended to, petitioner retired to his quarters to await the arrival of law enforcement officers.
 It is unnecessary to decide whether this version of the homicide is true. It is set forth simply to show that petitioner had a defense, which, if wholly or partially believed by the trier of fact on a plea of not guilty, would lead to acquittal or at most to a conviction of a lesser crime than first degree murder.
 Petitioner appeared without counsel at the preliminary hearing on December 12, 1944, in the justice's court and was not informed of his right to counsel.  [fn. 1] Bill Watson, a worker on the ranch, testified that Thomas and petitioner had been at the dice table, that Thomas picked up some money from the table, and that Thomas and petitioner had an argument over some money and "something about point eight." As to what happened thereafter, he testified as follows: "Q. ... What did they do after you got in there? A. Well, the bell rung for supper. Everybody was going out to eat, so they went out the door and I went out the door. Q. Which door did they go out? A. The little door there on the side. ... Q. Which one went out the door first? A. Charlie [Thomas]. ... Q. Did he go out the side door in a hurry or did he just walk out slowly? A. He went out in a hurry. Q. When he went out the side door in a hurry, did the defendant, O. D. *306 James, go out this same door? A. Yes, sir. He went outside. Q. How close behind Thomas was he when he went out the door? A. I don't know exactly. Q. Well, approximately. Approximate it. About how far behind him? A. Well, I told you the truth, I don't know, because they was going out to supper there, you know, so I couldn't tell how close he went out behind. Q. Did he go out in a hurry or did he just walk out casually? A. Well, when he went out the door, he was going out, he was just walking out. ... Q. Did anybody else go out that side door? A. I didn't see nobody. I went out the front door there. ... Q. Did you see Charlie Thomas at any time after he had gone out the side door? A. No, sir. Q. You never saw him again? A. Well, I seen him laying on the ground, after I walked across to the mess hall there. ... Q. How long after he picked up the money was it that he left by the side door? A. About five minutes. Q. He stood there with the money in his hand five minutes before he left by the door? A. I think it was five minutes. I don't know. I didn't have no watch on me. Q. Well, as a matter of fact, did the defendant here O. D. James follow the man Charlie Thomas, out the side door right away? Did he go right out after he went out? A. I don't know whether he went right out behind him or not. All I know, he walked out the same door. Q. Was that about the same time? A. Shortly after."
 Felix Neal, another worker at the ranch, testified that he had been shooting the dice, that he made his point, which was eight, that he did not know anything about a side bet, that the argument started when Thomas grabbed some money from the table and that the argument continued for about five minutes. As to what happened thereafter, he testified as follows: "Q. Then what happened? A. Then they went out--well, before they went out, I walked out, I started to leave out of there, out of the room there. So they went out and I don't know what happened. Q. Where were the two men, Thomas and James when you left the canteen? A. They was inside that little small room there. Q. They hadn't gone out yet? A. No. They started to leave out before I beat it out; I left out. Q. Which door did you go out? A. The front door. Q. Had they started to go out when you left? A. Well, they had--they looked like they was going out. Q. Do you know which door they headed for? A. No, sir. Q. Or started to go out? A. I didn't see them. Q. They started to go out. Who was going out first? A. Charlie. I think he started to go out, something like that. Q. Did this man James follow *307 him or not, do you know? A. Well, he went around the table there. That is when I left there. Q. Who went around the table? A. The defendant here. Q. Where was Thomas when the defendant went around the table. A. Thomas? Q. Yes. Charlie Thomas. A. Charlie Thomas, oh, he was on this side of the table, close to the small heater they got there. Q. Where was James? On the same side of the table or the other side? A. On the other side of the table. Q. That is when you mean that James went around the table? A. When he went around the table, that is when I left. Q. Why did you leave at that time? A. Well, because I was waiting for chow time. ... Q. Well, then, Neal, when you shot the dice and made your point of 8, that is when Thomas grabbed the money, is that right? A. Yes, sir. Q. Then there was an argument over it between Thomas and James? A. Well, I didn't--I didn't understand if it was an argument, they made so much fuss there. Q. You called it an argument. A. It sounded like an argument about some money. Q. Is that when James went around the table? A. Yes, sir. Is this James here? Q. Yes. A. Yes. Q. He went around the table after Charlie? A. Yes. Q. Is that when you left? A. Yes, sir, that is when I left. I left out the front door. Q. Did you see Charlie after that? A. No, sir, I didn't see him."
 Albert H. Lopez, constable of the township, testified that petitioner said that he had made a side bet with Thomas on the fall of the dice and that the argument was over the question whether Thomas had bet with or against the dice. Lopez further stated that immediately after the homicide, petitioner told him what happened, giving substantially the same version as that set forth in petitioner's affidavit. No other witnesses testified, and petitioner did not testify in his own behalf.
 At the arraignment in the superior court, on December 15th, the court asked petitioner if he would like to have a lawyer and petitioner replied that he would like to have one.  [fn. 2] Petitioner *308 then pleaded not guilty. The court continued the matter one week for the appointment of an attorney.
 Four days later Melvin K. Gibbs, Assistant District Attorney, and petitioner, again without counsel, appeared in the superior court. Nothing was said by Gibbs or the court about the order of continuance to December 22d, and no order was entered advancing the case on the calendar. Gibbs told the court that petitioner had sent a note asking to see him and stating that he wanted to plead guilty. The trial court asked petitioner if he wished to plead guilty and he replied that he did. The court then permitted him to withdraw his plea of not guilty and to plead guilty. Gibbs then stated: "If the Court please, it might--your Honor might be able now to fix the degree, that will take but a moment. In brief the facts are that this defendant and the deceased were playing dice at Griffen Ranch No. 2. Some altercation arose over the fact that the deceased person grabbed the money from the dice game--that money did not belong to this defendant by the way  [fn. 3]--this defendant started after him, and then the deceased man ran out the side door, followed by the defendant. The defendant stated to me that then and there he dropped his hat and as he reached to get it, the deceased, Charlie Thomas pulled a knife on him; that this defendant took the knife away from him, and thereupon proceeded to stab him, and that stab wound caused the death. There is no doubt in my mind but what it is murder in the first degree. But those are the facts as I have outlined them, and including the statement the defendant made." Gibbs then asked petitioner "Did you hear what I said? Is that about right?" Petitioner replied "That is right." The trial court accepted Gibbs' claim that the degree of the crime was first degree murder, and the case was continued for determination of the sentence.
 On December 22d petitioner came into court for sentence, again without counsel. The court informed petitioner of the several steps that had occurred in the proceedings, omitting, however, petitioner's request for the appointment of counsel, the continuance of the case for that purpose, and the special appearance on the 19th and the change of plea. The court fixed the punishment at life imprisonment. The court then asked petitioner questions about his education, family background, military record, and work history.
 On March 3, 1950, counsel for petitioner appeared in the *309 Superior Court of Fresno County before the same trial judge who had presided at the December, 1944, proceedings for hearing on a motion in the nature of a petition for a writ of error coram nobis. The trial judge denied the motion. On September 18, 1950, the District Court of Appeal, Fourth District, affirmed the order of the trial court on the ground that petitioner's contentions could not be determined on a petition for a writ of error coram nobis. (People v. James, 99 Cal.App.2d 476 [222 P.2d 117].) On July 17, 1951, petitioner filed an original petition for habeas corpus in this court. (Cal. Const., art. VI,  4; Pen. Code,  1475.) The petition appeared meritorious, and we entered an order to show cause why the relief prayed for should not be granted. The attorney general has filed the record on appeal in the coram nobis proceeding, which includes a full transcript of the proceedings upon the original commitment.
 The attorney general, relying on People v. Adamson, 34 Cal.2d 320, 327 [210 P.2d 13] and People v. Shorts, 32 Cal.2d 502, 513 [197 P.2d 330], contends that the petition should be dismissed without consideration of its merits for inadequate explanation of the delay in filing it. Neither case is applicable, for both involved coram nobis proceedings. [1] Even if the strict requirement of diligence in coram nobis proceedings were a prerequisite of the writ of habeas corpus, petitioner's affidavit and the record of the 1950 coram nobis proceeding present a satisfactory explanation of the delay. It appears therein that because of his ignorance, petitioner did not realize that he had any grounds for attacking the judgment until long after the time for appeal had expired, that because he could hardly read or write he had no friends or acquaintances in the outside world with whom he could correspond or who could press his cause, that he was dependent solely on the officials at the prison for any move in his behalf, and that finally, through the aid of a chaplain at the prison, he was able to get the National Association for the Advancement of Colored People interested in his case and thus receive competent legal advice. (See In re Jones, 88 Cal.App.2d 167, 169 [198 P.2d 520].)
 [2] The writ of habeas corpus may not be used as a substitute for an appeal, but if fundamental constitutional rights of the petitioner have been violated the writ will lie. (People v. Adamson, 34 Cal.2d 320 [210 P.2d 13]; In re McCoy, 32 Cal.2d 73, 76 [194 P.2d 531]; In re Wallace, 24 Cal.2d 933, 938 [152 P.2d 1]; In re Bell, 19 Cal.2d 488, 494, 507 [122 P.2d *310 22].) [3] The right to counsel is a fundamental constitutional right, which has been carefully guarded by the courts of this state. (In re McCoy, 32 Cal.2d 73 [194 P.2d 531]; People v. Manchetti, 29 Cal.2d 452, 458 [175 P.2d 533]; People v. Chesser, 29 Cal.2d 815 [178 P.2d 761]; People v. Lanigan, 22 Cal.2d 569 [140 P.2d 24, 148 A.L.R. 176]; In re Jones, 88 Cal.App.2d 167 [198 P.2d 520]; People v. Avilez, 86 Cal.App.2d 289 [194 P.2d 829]; People v. Zammora, 66 Cal.App.2d 166 [152 P.2d 180]; People v. McGarvy, 61 Cal.App.2d 557 [142 P.2d 92]; see earlier cases collected in 7 Cal.Jur. 939, 973, 990.)
 The accused has the right in criminal prosecutions in any court whatever "to appear and defend, in person and with counsel." (Cal. Const., art. I,  13.) At the preliminary examination the magistrate must inform the accused of his right to counsel, ask him if he desires counsel, and allow him a reasonable time to send for counsel. If the felony charged is not punishable with death, the defendant may plead guilty to the offense at the preliminary examination in the presence of counsel. (Art. I,  8.) These basic guarantees are supplemented by many provisions of the Penal Code. When the defendant is brought before the magistrate, the latter "must immediately inform him ... of his right to the aid of counsel in every stage of the proceedings." (Pen. Code,  858.) "If the public offense charged is an offense not punishable with death ... while the charge remains pending before the magistrate and when his counsel is present, the defendant may, with the consent of the magistrate and the district attorney or other counsel for the people, plead guilty to the offense charged. ... The foregoing provisions of this section shall not be construed to authorize the receiving of a plea of guilty from any defendant not represented by counsel." (Pen. Code,  859a.) "If the defendant appears for arraignment without counsel, he must be informed by the court that it is his right to have counsel before being arraigned, and must be asked if he desires the aid of counsel. If he desires and is unable to employ counsel, the court must assign counsel to defend him." (Pen. Code,  987.) In 1949, after the proceedings in the present case, Penal Code, section 1018, was amended to provide that no plea of guilty to a felony for which the maximum punishment is death shall be received from a defendant who does not appear with counsel.
 [4] The United States Supreme Court has repeatedly *311 stated that the due process clause of the Fourteenth Amendment of the United States Constitution requires counsel to be furnished to the accused in capital cases. (Quicksall v. Michigan, 339 U.S. 660, 666 [70 S.Ct. 910, 94 L.Ed. 1188]; Gibbs v. Burke, 337 U.S. 773, 780 [69 S.Ct. 1247, 93 L.Ed. 1686]; Uveges v. Pennsylvania, 335 U.S. 437, 441 [69 S.Ct. 184, 93 L.Ed. 127]; Bute v. Illinois, 333 U.S. 640, 674 [68 S.Ct. 763, 92 L.Ed. 986]; Williams v. Kaiser, 323 U.S. 471, 474 [65 S.Ct. 363, 89 L.Ed. 398]; Tomkins v. Missouri, 323 U.S. 485, 488 [65 S.Ct. 370, 89 L.Ed. 407]; Powell v. Alabama, 287 U.S. 45, 71 [53 S.Ct. 55, 77 L.Ed. 158, 84 A.L.R. 527]; 22 So.Cal.L.Rev. 259.) [5] A state court is required "to initiate an inquiry into the desire of the accused to be represented by counsel, to inquire into the ability of the accused to procure counsel or, in the event of the inability of the accused to procure counsel, to assign competent counsel to conduct his defense." (Bute v. Illinois, 333 U.S. 640, 674 [68 S.Ct. 763, 92 L.Ed. 986].)
 [6] The record shows that petitioner was represented by counsel only for the purpose of arraignment and at no other stage of the proceedings. Thus, in clear violation of the express mandate of article I, section 8 of the California Constitution and of Penal Code, section 858, petitioner was not informed of his right to counsel when first brought before the magistrate. Moreover, the trial court did not inform him of his right to counsel at the time it accepted his plea of guilty, or even ask him if he waived the right to counsel or if he no longer wished counsel as requested at the time of arraignment. Nor did the court inform him of the possible maximum penalty or of the possibility of there being different degrees of the crime charged. Petitioner, an illiterate farm laborer without previous encounters with the law or experience in the intricacies of criminal procedure, could hardly be expected to comprehend the possible offenses and various punishments involved in this homicide or to know how to weigh, let alone present, the defenses available thereto. The elements of murder and manslaughter, the distinctions between first and second degree murder and the principles governing defenses to charges of such crimes are often difficult even for experienced judges and skilled practitioners to apply. "The right to be heard would be, in many cases, of little avail if it did not comprehend the right to be heard by counsel. Even the intelligent and educated layman has *312 small and sometimes no skill in the science of law. If charged with crime, he is incapable, generally, of determining for himself whether the indictment is good or bad. He is unfamiliar with the rules of evidence. Left without the aid of counsel he may be put on trial without a proper charge, and convicted upon incompetent evidence, or evidence irrelevant to the issue or otherwise inadmissible. He lacks both the skill and knowledge adequately to prepare his defense, even though he have a perfect one. He requires the guiding hand of counsel at every step in the proceedings against him. Without it, though he be not guilty, he faces the danger of conviction because he does not know how to establish his innocence. If that be true of men of intelligence, how much more true is it of the ignorant and illiterate, or those of feeble intellect." (Mr. Justice Sutherland in Powell v. Alabama, 287 U.S. 45, 68-69 [53 S.Ct. 55, 77 L.Ed. 158, 84 A.L.R. 527].)
 The record in this case is eloquent proof of the wisdom of the observation that "the guiding hand of counsel is needed lest the unwary concede that which only bewilderment or ignorance could justify or pay a penalty which is greater than the law of the State exacts for the offense which they in fact and in law committed." (Tomkins v. State of Missouri, 323 U.S. 485, 488 [65 S.Ct. 370, 89 L.Ed. 407].) Not only the record, but even Gibbs' statement to the court, indicates that the crime was less than murder in the first degree. It is difficult to believe that a lawyer representing petitioner would have advised petitioner to plead guilty to murder or permitted Gibbs' statement to go unchallenged.
 [7] When petitioner's plea of guilty was accepted by the trial court, the prosecution had yet to establish that he had a deliberate intent to kill when he struck Thomas. (Pen. Code,  188, 189.) At no time did the court take any evidence for the purpose of determining the degree of the crime, as it was required to do (Pen. Code,  1192; People v. Mendez, 27 Cal.2d 20, 23 [161 P.2d 929]; In re Hough, 24 Cal.2d 522, 534 [150 P.2d 448]; People v. Verdier, 96 Cal.App.2d 29 [214 P.2d 433]; In re Hammond, 24 Cal.App.2d 18 [74 P.2d 308]; People v. Hammond, 26 Cal.App.2d 145 [78 P.2d 1172]), but depended solely upon the opinion of the Assistant District Attorney that it was murder in the first degree. There is no evidence that this killing occurred during the commission of a felony, and the only evidence that might possibly indicate premeditation is that petitioner followed Thomas outside the canteen. *313
 The attorney general, relying on In re Tedford, 31 Cal.2d 693 [192 P.2d 3], contends that by requesting to change his plea, petitioner impliedly waived his right to counsel and is therefore precluded from making his present contention that he was deprived of his constitutional rights. Unlike petitioner, however, Tedford did not request counsel, nor was he charged with a capital offense. The record showed that he was fully aware of the nature of the proceedings and had an intelligent conception of the consequences of his act. Under these circumstances it was held that a plea of guilty was sufficient to waive the right to counsel. (In re Tedford, 31 Cal.2d 693, 695 [192 P.2d 3]; In re Jingles, 27 Cal.2d 496 [165 P.2d 12]; People v. Walker, 93 Cal.App.2d 54, 57 [208 P.2d 724].)
 [8] Even if it is assumed that a plea of guilty in a capital case could be received at the time of petitioner's plea of 1944 (before the amendment to Pen. Code,  1018, supra) from a defendant who did not appear with counsel, it does not follow that in such a case a plea of guilty implied a waiver of the right to counsel. As the seriousness of the charge increases, a purported waiver must be scrutinized with corresponding care. If a capital crime is charged, as herein, the mere statement that the accused wishes to plead guilty is not enough to show a waiver of the constitutional guarantee. [9] Moreover, the court cannot accept a waiver of counsel from anyone accused of a serious public offense without first determining that he "understands the nature of the charge, the elements of the offense, the pleas and defenses which may be available, or the punishments which may be exacted." (People v. Chesser, 29 Cal.2d 815, 822 [178 P.2d 761]; Uveges v. Pennsylvania, 335 U.S. 437, 440-441 [69 S.Ct. 184, 93 L.Ed 127].) There was no attempt to make such a determination in this case. The record shows that defendant was an itinerant farm hand, without formal education, without money, and evidently without previous experience with courts.
 [10] Since the procedure here was in clear violation of petitioner's constitutional rights, the conviction must be set aside. (In re McCoy, 32 Cal.2d 73, 77 [194 P.2d 531]; In re Jones, 88 Cal.App.2d 167 [198 P.2d 520]; Uveges v. Pennsylvania, 335 U.S. 437 [69 S.Ct. 184, 93 L.Ed. 127]; Gibbs v. Burke, 337 U.S. 773 [69 S.Ct. 1247, 93 L.Ed. 1686].)
 [11] Petitioner contends that if the judgment is void, he "should be restored to his liberty." The evidence at the preliminary hearing, however, was sufficient to justify the committing *314 magistrate's concluding that a public offense had been committed and that there was reasonable cause to hold petitioner for trial. (Pen. Code,  872; People v. McGee, 31 Cal.2d 229, 234 [187 P.2d 706]; People v. Nagle, 25 Cal.2d 216, 222 [153 P.2d 344].) The denial of petitioner's right to counsel did not serve to acquit him of the offense charged, and he is still subject to trial. (In re McCoy, supra, 32 Cal.2d 73, 77; see Pen. Code,  799, 1486; cases collected in 97 A.L.R. 160.)
 On oral argument the deputy attorney general stated that "an examination of the record convinces the Attorney General's office that manslaughter was the greatest crime committed by this Petitioner, and we are taking the laboring oar in calling the matter to the attention of the Governor, asking for commutation of sentence to time served."  [fn. 4] If petitioner were convicted of manslaughter on a second trial, his confinement based upon the invalid 1944 judgment, together with any time credits for good conduct earned thereon (Pen. Code,  2920), would be credited upon the new sentence for the same criminal act. (Pen. Code,  2900.1.)
 The writ is granted, the return to the order to show cause shall stand as the return to the writ, and the petitioner is discharged from the custody of the warden at San Quentin and committed to the custody of the sheriff of Fresno County for further proceedings in accordance with the views expressed in this opinion.
 Gibson, C.J., Shenk, J., Carter, J., Schauer, J., and Spence, J., concurred.
 EDMONDS, J.
 Upon the hearing of a motion here characterized as "in the nature of a petition for a writ of error coram nobis," the superior court denied James any relief and that order was affirmed by the district court of appeal. (People v. James, 99 Cal.App.2d 476 [222 P.2d 117].) The facts upon which the present determination is based are taken from the record of that proceeding. I concur in the conclusion *315 that, under the circumstances there shown, if those facts now can be accepted as true, the conviction of James was in clear violation of his constitutional rights and he is entitled to have it set aside.
 However, I see no reason for here referring to the law which would be applicable in the event that James is tried and convicted of manslaughter. That is a contingency which has nothing to do with the decision in the present proceeding.
NOTES
[fn. 1]  1. The Court: You have no attorney at this time, have you? The Defendant: No. The Court: All right. Proceed."
[fn. 2]  2. "Q. Now, is O. D. James your true name? A. Yes. Q. Are you represented by counsel? A. No. Q. By a lawyer? A. No. Q. Do you want a lawyer to represent you? A. I would like to have one. Q. Do you have any money to pay for a lawyer? A. No, not yet. Court: Well Mr. Ozias [an attorney present at the proceedings] will you represent him for the purpose of arraignment with, however, the right to withdrawal if you wish? Ozias: Yes. ... Gibbs: If you are going to appoint an attorney that should be done before the case is set. It might not be an agreeable date for the attorney. ... Court: The matter will be continued one week from today for the appointment of an attorney."
[fn. 3]  3. There was no evidence that the money did not belong to petitioner.
[fn. 4]  4. The petition alleges that the Adult Authority has also recommended commutation. "On April 21, 1949, the Adult Authority at its clemency meeting held at Sacramento considered your affiant's application for Commutation of Sentence and the said Adult Authority recommended to the Governor that Commutation of Sentence to reduce the offense of Murder first degree to Manslaughter be granted; that the complete file was returned to the Governor's office on April 25, 1949, with this recommendation, but as yet no action has been taken on this recommendation."
