
48 Cal.2d 408 (1957)
In re C. L. ATCHLEY, on Habeas Corpus.
Crim. No. 5749. 
Supreme Court of California. In Bank.  
Apr. 23, 1957.
 C. L. Atchley, in pro. per., and Michael di Leonardo, under appointment by the Supreme Court, for Petitioner.
 Edmund G. Brown, Attorney General, Doris H. Maier and J. M. Sanderson, Deputy Attorneys General, for Respondent.
 SCHAUER, J.
 By his petition for habeas corpus C. L. Atchley, an inmate of Folsom State Prison, attacks the validity of a judgment of conviction of first degree murder and of assault with a deadly weapon with intent to commit murder. His basic contention is that his pleas of guilty to the charges of murder and the described assault, and his stipulation that the murder was of the first degree, are vitiated by violations of fundamental constitutional rights, particularly by asserted inadequacy and misrepresentation of defense counsel, as hereinafter described. We have concluded that, on the contrary, petitioner was ably and faithfully represented by his trial counsel and benefited by such representation, and that the relief sought should be denied.
 The petition for habeas corpus alleges that petitioner is "an uneducated person, who can only, with great difficulty, read, or understand very simple words," and that "a 'friend' whose qualification cannot be revealed in this action, prepared this petition for your petitioner in the interests of justice." This court issued an order to show cause and appointed counsel for petitioner. By affidavits and argument it developed that *410 petitioner's contentions of law rested upon assertions of fact which were controverted by the attorney general, who represents respondent warden. This court appointed a referee to take evidence and make findings and a report upon the following questions:
 Was there unqualified, untrue factual representation of the public defender, petitioner's counsel, that a responsible officer of the state had entered into a bargain purporting to commit the state to give petitioner a lesser punishment than he might otherwise receive, in exchange for pleas of guilty; was such representation apparently substantially corroborated by acts or statements of a responsible state officer; and did petitioner change his pleas from not guilty to guilty in reliance in good faith upon such representation and not in the exercise of his own free will and judgment? (See People v. Gilbert (1944), 25 Cal.2d 422, 443 [154 P.2d 657].)
 Did the public defender fail to have reasonable consultation with petitioner, unreasonably refuse to present witnesses suggested by petitioner, or otherwise fail to represent petitioner properly and effectively?
 At the hearing concerning the foregoing questions, the referee diligently performed his duty and petitioner's present court-appointed counsel diligently represented petitioner. The referee determined that the answer to the question first stated above, in its entirety and in each part, is "no." As to the second question stated above, the referee determined that the public defender did not fail to have reasonable consultation with petitioner, but that the public defender did "fail to represent defendant [petitioner] properly and effectively." The referee expressed his high regard for the integrity and ability of the public defender, but explained that he (the referee) reached his last quoted determination because "for some unexplained reason, from the very first, it is apparent ... [that the public defender] did not want to represent defendant," and because the public defender refused to call one Onis Belt as a witness for defendant-petitioner.
 It is petitioner's theory that the shootings which resulted in his convictions were in self-defense, and that Belt witnessed and could have testified to circumstances of the shootings which would have supported petitioner's claim of self-defense. The public defender told petitioner at the time of trial, and testified before the referee, that he would not use Belt as a witness because he feared that Belt's testimony would be discredited and that petitioner, if he relied on Belt's discreditable testimony, would receive the death penalty. It was the opinion *411 of the referee that the public defender might properly have refused to present Belt's testimony if counsel had been "sure" that such testimony would be false, but that because counsel was only "suspicious" that the testimony would be false and because petitioner, informed by counsel that he might receive the death penalty if Belt's testimony were used, still insisted that he wished Belt to testify.
 [1] The referee's findings and report are not binding upon this court (In re Egan (1944), 24 Cal.2d 323, 332 [149 P.2d 693]; In re Mooney (1937), 10 Cal.2d 1, 17 [73 P.2d 554]) but in considering his determinations we give due regard to his opportunity to observe the demeanor of the witnesses and weigh their statements in connection with their manner on the stand (In re Mitchell (1950), 35 Cal.2d 849, 855 [221 P.2d 689]; In re Marvich (1946), 27 Cal.2d 503, 516 [165 P.2d 241]; In re De La Roi (1945), 27 Cal.2d 354, 364 [164 P.2d 10]). Our determinations in this matter, both those which agree with the report of the referee and those which differ from his report, are based upon consideration of the following matters revealed by the affidavits filed by both parties, the transcript of proceedings on petitioner's arraignment, the transcript on petitioner's appeal from the judgment of conviction, and the transcript of the proceeding before the referee.
 According to prosecution evidence the following facts led to the charges and convictions of murder and assault: In August, 1953, petitioner met Helen, the victim of the subsequent assault. Beginning shortly thereafter, petitioner and Helen lived together as man and wife until the end of June, 1954. Immediately after petitioner and Helen separated, Helen met Mr. Hilliard. On July 10, 1954, Helen and Hilliard intermarried. Helen and Hilliard resided in a cabin near the ranch house of Richard Moore. Petitioner unsuccessfully tried to persuade Helen to return to him. On July 27, 1954, petitioner, armed with a revolver, went to the Moore ranch, entered the ranch house, and shot Moore. In the ranch house was a shot gun. Moore ran from the house and fell, dying. Helen ran from the porch of the house to Moore. Petitioner came from the house carrying both the shot gun and the revolver. With the revolver petitioner shot Moore again and also shot Helen twice. As a result of the shots Moore died and Helen was seriously wounded. Petitioner stated several times, shortly after the shootings, that he had killed both Moore and Helen. On the day of the shootings, petitioner told the district attorney and the sheriff that he had shot both Helen and Moore. *412 He suggested that he shot Moore after the latter threatened to shoot him, but he did not then intimate that Helen had a weapon or that she threatened him. That fact becomes significant because of the claims that he now makes, as hereinafter developed.
 When petitioner was arraigned in the justice court, the public defender was appointed as his counsel. In the justice court and again when petitioner was arraigned in the superior court the public defender asked to be relieved of his appointment. The record and the referee's report disclose that on both occasions this request was on the stated ground that the public defender believed that petitioner had sufficient assets to employ private counsel. The committing magistrate and the superior court judge reached the contrary conclusion, and thereafter the public defender faithfully and efficiently represented petitioner. Although petitioner testified before the referee that the public defender had not desired to represent petitioner, it does not appear that the public defender's personal feelings in this respect (if he had any such feelings other than those hereinafter related which arose during the trial in respect to the proposed use of Belt and one Morse as witnesses) interfered with his performance of his duty.
 Petitioner pleaded not guilty to the charges of murder and assault, and trial before a jury began. The People presented evidence on Wednesday and Thursday, November 17 and 18, 1954. After the second day of the taking of prosecution evidence, petitioner and the public defender disagreed as to how the defense of petitioner should be handled.
 On Friday, November 19, 1954 (before the taking of additional prosecution evidence began and out of the presence of the jury), the public defender, petitioner, and the district attorney appeared before the trial judge and the colloquy quoted in the margin occurred.  [fn. 1] From this colloquy, standing *413 alone, it might seem that the trial judge forced petitioner to continue to be represented by the public defender against the wishes and judgments of both the public defender and his *414 client, in order that the county might be spared loss of time and expense. However, as will hereinafter be related, it appears from the record viewed as a whole that petitioner and the public defender decided, without any misrepresentation to, or coercion of, petitioner by the public defender or by the trial judge or by the prosecuting attorney, that petitioner should change his plea and should not present a defense which the public defender honestly and for reasonable cause believed would be false, would be discredited by the jury, and might well result in the death penalty.
 After the colloquy quoted in footnote 1, the People presented more evidence to the jury. Then, at noon on Friday, November 19, 1954, the case was adjourned until Monday morning, November 22, 1954. On that Monday morning the trial judge, at the request of the public defender, permitted petitioner to change his pleas. Petitioner personally pleaded guilty and it was stipulated that the murder was of the first degree.
 On Friday, November 26, 1954, the trial judge sentenced petitioner to life imprisonment on the first degree murder conviction and ordered that the sentence on the assault conviction and the sentence on the murder conviction run concurrently.
 Petitioner in propria persona appealed from the judgment of conviction and the judgment was affirmed. (People v. Atchley (1955), 132 Cal.App.2d 444 [282 p.2d 160].) On his appeal petitioner ineptly presented the following contentions (p. 446 of 132 Cal.App.2d): "that he was not allowed to seek his own attorney; that he was not allowed to produce witnesses and not permitted a jury trial; ... that the judge and district attorney were guilty of misconduct; that his attorney sold him out to the prosecution." The District Court of Appeal concluded that "The record is utterly devoid of any support for any of the foregoing contentions."
 In his petition for habeas corpus petitioner suggests that he might be able to establish variations of the above contentions by supplementing the colloquy quoted from the record on appeal, ante, footnote 1, pages 412-413, with evidence outside that record.
 There is ample, credible evidence before the referee which supports his conclusion that "There were no untrue factual representations made by the Public Defender, the District Attorney, the Judge of the Superior Court, or anyone else. The Defendant knew exactly what punishment he would receive *415 if he plead[ed] guilty and this punishment he did receive." The trial judge testified before the referee that "I believe Mr. Heenan [district attorney] and the public defender Mr. Schoenig--I don't know whether the defendant was with them, or not--came into the Chambers and advised me for the first time that there might be a change of plea; and wanted to know what my position would be in the event it was a plea of guilty of first degree murder. And, I think, I assured them that it would not--that I would not inflict the extreme penalty of the law. I want it understood that is not a practice of mine in the general felony cases; I have never bargained with a defendant, in exchange for a plea, any sentence, but I do feel in a murder case that it is only fair before a defendant enter[s] a plea of guilty that he knows the extreme penalty is not going to be imposed." The district attorney testified to the same effect. The public defender testified that "The summation [of his discussions with the district attorney concerning change of pleas] was ... first degree murder, no death penalty, plead [guilty] to count 2, and that he [the district attorney] would not oppose having count 2 run concurrent with the first degree"; the public defender communicated this "summation" to petitioner and petitioner told the public defender that "he would accept if it meant he would not get the death penalty." Petitioner's contrary evidence (that the public defender assured him that petitioner "would only receive a sentence of '5 to life' ") does not appear probable.
 As already indicated, a crucial question appears to be whether the public defender, after the trial judge refused his request to withdraw from the case, and before petitioner changed his pleas, could properly decide, and advise petitioner, that he (the public defender) did not believe defendant's proposed witnesses and that in the public defender's opinion the production of such witnesses before the jury would result in the jury's disbelieving the witnesses and imposing the death penalty, and in perjury charges against such witnesses. There can be no doubt of the honesty of the public defender's actions in this regard, but there is a question of law as to their propriety. In this connection the referee concluded that petitioner was, in effect, induced to change his pleas because the public defender refused to present the defense, the trial judge refused to let petitioner present the defense personally or obtain a counsel who would present such defense, "and faced with this situation the change of plea *416 probably appeared to defendant as the only possible manner in which he could save his life."
 The public defender in his opening statement to the jury said that petitioner proposed to prove self-defense.
 The public defender testified as follows before the referee: Petitioner in interviews with the public defender concerning his defense consistently claimed that he entered the ranch house without intent to kill Moore and that he shot Moore because Moore reached for Moore's shot gun and threatened to kill petitioner. With reference to petitioner's firing of shots outside the ranch house petitioner on various occasions changed materially the substance of his stories to the public defender; "initially he had never said anything about any weapon with Mrs. Hilliard; but as the trial kept coming up, then he had a gun in Mrs. Hilliard's hand. And this is where I started getting leery." Then before commencement of the trial petitioner told the public defender that Onis Belt and James A. Morse had observed and would testify to circumstances which would tend to show that petitioner shot both victims in self-defense. The public defender after commencement of the trial interviewed Belt once and Morse twice. In the public defender's first interview, their accounts of the shooting by petitioner substantially agreed with petitioner's latter account in that both Belt and Morse said that they saw a weapon in Helen's hand. Thereafter, Morse returned and told the public defender that "he was afraid he wouldn't be too good a witness; possibly he didn't see all that; and maybe Belt was the only one that saw it"; during his second conversation with the public defender, Morse indicated that he had not seen the shootings.
 The public defender privately told petitioner that "in my opinion if they [Belt and Morse] went on under cross examination they would be torn to shreds; ... it might be the death penalty; and I couldn't afford to take that chance for him." Petitioner replied that nevertheless he wanted Belt and Morse to testify. The public defender said that in that event he would ask to withdraw. Petitioner replied that he would personally present the testimony of Belt and Morse.
 Then occurred the colloquy with the trial judge quoted ante, footnote 1, pages 412-413.
 After that colloquy and the adjournment of trial for the weekend, according to the public defender's testimony before the referee, "it was still Mr. Atchley's intent he wanted them to testify over my objections, and I said to him, I have *417 no way of checking out their story to prove I am wrong; I have no investigator in my office. I said, if you feel they will exonerate you, and if you wish to concur, we will allow the Sheriff to investigate the statements, and let him report back to us." Petitioner agreed. As the result of the sheriff's investigation, the public defender testified, "I felt that they [Belt and Morse] weren't at the scene when the shooting took place. ... I felt at best they may have been there, but [at the time of the shooting] they were gone." Furthermore, because Morse had signed a job application at a place distant from the shooting on the date of the shooting, the public defender believed that it was "improbable" although not "impossible" that Morse had been at the scene when the shooting occurred. Neither Belt  [fn. 2] nor Morse appeared before the referee.
 On the Monday morning before the trial resumed and petitioner changed his pleas, the public defender told petitioner and petitioner's family that "if Belt and Morse testified I felt it would be the imposition of the death penalty and they would be open to perjury charges, in my opinion." Petitioner agreed that Belt and Morse should not be produced and asked the public defender "to find out, or to ask the District Attorney if he could have a second degree plea and get the count 2 dismissed; I said, I would try"; however, the public defender correctly told petitioner that prior to trial the district attorney had refused to make such an arrangement and that he would probably still refuse. Thereafter, the "bargain" described ante, pages 414-415, was negotiated and petitioner changed his pleas and received the sentence for which he "bargained."
 Petitioner's testimony before the referee is contrary to that of the public defender in many respects. The referee believed the testimony of the public defender but concluded that the public defender should have presented a defense which the public defender believed was false and let petitioner gamble on the chances that the jury might impose a death sentence *418 or a life sentence for murder, or might convict petitioner of a lesser offense than murder, or might acquit petitioner. Instead, the public defender chose to assure petitioner a life sentence.
 [2] Mere advice or assurance by a private attorney to a defendant accused of crime will not vitiate a plea entered in reliance thereon. (People v. Gilbert (1944), supra, 25 Cal.2d 422, 443.) [3] Generally speaking, "when the public defender is appointed to represent a defendant accused of a crime, he becomes the attorney for said defendant for all purposes of the case and to the same extent as if regularly retained and employed by the defendant." (In re Hough (1944), 24 Cal.2d 522, 528-529 [150 P.2d 448].) Nothing appears in the present record which would require or justify considering the public defender here in a different light from that in which a private attorney would be considered.
 We recognize the following ethical principles which govern the conduct of an attorney who undertakes to represent a defendant in a criminal case: Canon 5 of the Canons of Professional Ethics of the American Bar Association provides, "It is the right of the lawyer to undertake the defense of a person accused of crime, regardless of his personal opinion as to the guilt of the accused; otherwise innocent persons, victims only of suspicious circumstances, might be denied proper defense. Having undertaken such defense, the lawyer is bound, by all fair and honorable means, to present every defense that the law of the land permits, to the end that no person may be deprived of life or liberty, but by due process of law." Subdivision (c) of section 6068 of the Business and Professions Code provides that it is the duty of an attorney "To counsel or maintain such actions, proceedings or defenses only as appear to him legal or just, except the defense of a person charged with a public offense." Subdivision (e) of the same section provides that it is the duty of an attorney "To maintain inviolate the confidence, and at every peril to himself to preserve the secrets of his client."
 [4] It does not appear that the public defender here violated the foregoing duties. He had the right and duty to control the trial which was under way when petitioner and his counsel disagreed as to the advisability of presenting petitioner's claimed defense. Counsel then ably and diligently and correctly explained to petitioner counsel's view of the probable effect of the presentation of petitioner's claimed defense. Petitioner's counsel did not give up or destroy petitioner's claimed defense; rather, he fully explained to petitioner *419 what, in counsel's honest opinion, would be the result of presenting such claimed defense and petitioner, fully advised in the premises, accepted counsel's opinion and determined to plead guilty.
 In the circumstances, counsel's representation of petitioner was not "pro forma" rather than zealous and active, and such representation did not deprive petitioner of the right to the effective aid of counsel in any sense cognizable on habeas corpus; rather, it is our opinion that even if the record now before us (which, of course, includes matters which were not before the District Court of Appeal in People v. Atchley (1955), supra, 132 Cal.App.2d 444) were here on appeal, it would not impel the conclusion that there was any reversible error. (Cf. People v. Avilez (1948), 86 Cal.App.2d 289, 296- 297 [194 P.2d 829]; People v. Manchetti (1946), 29 Cal.2d 452, 458-459 [175 P.2d 533].)
 For the reasons above stated, the order to show cause is discharged and the petition is denied.
 Shenk, J., Carter J., Traynor, J., Spence, J., and McComb, J., concurred.
 Gibson, C.J., concurred in the judgment.
 "The Court: I don't desire to ask him any questions. ... I don't know what your differences of opinion on strategy are or whatever it may be, but I do know this case has gone for a week now and I am not going to relieve any attorney from his obligation in connection with prosecuting or defending it through to a finish. It will probably take a couple or three more days and therefore it will be between you and your client, the Defendant in the case, to work out your program, and if he insists on certain matters that you feel are not to his interests, and you can't convince him to the contrary, I would say that you should probably, as his attorney, go along with him."
 "Mr. Schoenig: I can't, Your Honor, I would swear on the Bible I cannot do it, Judge."
 "The Court: You don't have to take the stand, you don't have to be sworn, you don't have to do anything, all you have to do is conduct the case."
 "Mr. Schoenig: ... I can't do it the way it would be run [by petitioner-defendant] ... I passionately state I can't do it, Judge."
 "The Court: Then don't do it, do it your way, you are still on the case. ..."
 "The Defendant: I ain't allowed to have all my witnesses?"
 "The Court: You certainly are."
 "The Defendant: That is what I mean."
 "Mr. Schoenig: If that is the case, Judge, I believe it will be an injustice to Mr. Atchley to allow me to go ahead with it, for his interests."
 "The Court: You will conduct it as he wants to conduct it."
 "Mr. Schoenig: I just don't think I can do a good job for him. ..."
 "The Defendant: It wouldn't be a fair trial if he doesn't think he can give me justice."
 "Mr. Heenan [district attorney]: If the Court please, would it be proper for the Court to ask the Defendant if he agrees with Mr. Schoenig's request to withdraw?"
 "The Court: What difference does that make? You would have to try it all over again."
 "Mr. Heenan: No, but so far the Defendant hasn't either agreed or disagreed with the motion to withdraw."
 "Mr. Schoenig: It is all right with me."
 "The Court: I don't know what the difference is between them, but there is some difference between them. ... That happens frequently in many cases but it doesn't necessarily mean that after a case has gone on at considerable expense and time ..., that the mere whim of one or the other or both should upset the whole thing and try it over again with some other counsel."
 "Mr. Schoenig: I might state to the Court that it isn't something that came up prior to the trial. ... It is something which has arisen in the last couple of days, and I can't do it, Judge."
 "Mr. Heenan: Would it be proper for the Court to possibly appoint another attorney to confer with the Defendant and Mr. Schoenig over the week-end and prior to the presentation of the defense in this case?"
 "The Court: Yes, we haven't reached the defense case yet ... I would be willing to do that and see, maybe by Monday or when the case reaches the defense, there would be some clear understanding of what it is all about."
 "The Defendant: I would like to make one motion, Judge__________"
 "The Court: ... [Y]ou still have an attorney and any motion that is made will be made by the attorney."
 "The Defendant: If he is going to put me through the trial, I would like to have one from here or__________"
 "The Court: I know, but you had plenty of time to get an attorney before this case__________"
 "The Defendant: I didn't have the money to hire one with."
 "The Court: You have been adequately represented thus far in this case. Let's adjourn to the courtroom."
 The People have filed an affidavit of Morse. This affidavit avers that before the shooting Morse and Belt visited Mrs. Hilliard in a cabin outside Moore's house; a visitor unknown to Morse arrived and Mrs. Hilliard left the cabin; Morse heard a shot and he and Belt at once went toward their car; other shots were fired; Morse did not see either petitioner or the deceased Moore; Morse and Belt immediately drove away.
NOTES
[fn. 1]  1. "Mr. Schoenig [public defender]: ... A matter has come up which I have discussed with Mr. Atchley and we are now at opposite viewpoints on putting on the case of Mr. Atchley. Mr. Atchley desires it put on in one way and I will absolutely not put it on that way ... [T]he way we both feel, there is no possible way we can work together anymore on the case ... I ask at this time that the Court allow me to withdraw from the case. Mr. Atchley is in Court, if your Honor desires to ask him any questions. ...
[fn. 2]  2. Petitioner has presented an affidavit of Belt. This affidavit avers that Belt saw Mrs. Hilliard shoot at petitioner before petitioner shot her; petitioner knocked at Moore's door; Moore opened the door and said, "I'll just kill you"; petitioner said, "Don't go for that gun"; and Belt then heard two shots. The affidavit of Belt does not mention Morse.
