
23 Cal.3d 208 (1979)
589 P.2d 396
152 Cal. Rptr. 141
THE PEOPLE, Plaintiff and Respondent,
v.
WILLIE BOLTON, Defendant and Appellant.
Docket No. Crim. 20294.
Supreme Court of California.
February 2, 1979.
*210 COUNSEL
Paul N. Halvonik, State Public Defender, Clifton R. Jeffers, Chief Assistant State Public Defender, Michael G. Millman and Isadora W. Lomhoff, Deputy State Public Defenders, for Defendant and Appellant.
Evelle J. Younger, Attorney General, Jack R. Winkler, Chief Assistant Attorney General, Edward P. O'Brien, Assistant Attorney General, W. Eric Collins, Derald E. Granberg and Michael D. Whelan, Deputy Attorneys General, for Plaintiff and Respondent.
*211 Herbert M. Rosenthal as Amicus Curiae, upon the request of the Supreme Court.
Joseph Freitas, Jr., District Attorney (San Francisco), Daniel H. Weinstein, Chief Assistant District Attorney, John J. O'Brien and Carol M. Hehmeyer, Assistant District Attorneys, Renzi & Kilbride and Fred Kilbride as Amici Curiae.
OPINION
BIRD, C.J.
Appellant appeals from his conviction for assault with a deadly weapon. (Pen. Code, § 245, subd. (a).) The case presents two issues: (1) Did the prosecutor engage in prejudicial misconduct when he insinuated to the jury during closing argument that appellant had a record of prior convictions or a history of wrongful acts? (2) Did the trial court err in sentencing appellant to state prison based in part on the fact that appellant had fathered several children who were on welfare and some of whom were borne out of wedlock?

I
On the afternoon of July 3, 1976, appellant was visiting the house of a girl friend when Clifford Hollister came to the house, looking for the sister of appellant's friend. Hollister was told that the sister was not present and he was given her home address. A quarrel then broke out between appellant and Hollister during which Hollister threatened to either "kill" appellant or to "kick his ass." However, the two separated without violence.
Later the same day, Hollister and a friend drove to the sister's home, and honked their car horn. The sister and appellant's girl friend came out from the apartment, talked briefly with Hollister and then returned inside. Hollister testified that the sister told him to wait for her. After Hollister and his friend had been waiting in the car for some 10 to 15 minutes, appellant approached the car, pointed a shotgun at Hollister, and ordered the two men to raise their hands. When Hollister refused and reached to open the car door, appellant shot him.
At trial, appellant asserted self-defense. He testified that he thought Hollister was reaching for a gun and that the afternoon quarrel had left him fearful of Hollister.
*212 In his closing argument to the jury, the deputy district attorney twice hinted that, but for certain rules of evidence that shielded appellant, he could show that appellant was a man with a record of prior convictions or with a propensity for wrongful acts.[1] Appellant cites this conduct by the prosecutor as amounting to prejudicial error and requests a reversal of his conviction.

II
(1a) There is no doubt that the prosecutor's statement constituted improper argument, for he was attempting to smuggle in by inference claims that could not be argued openly and legally. In essence, the prosecutor invited the jury to speculate about  and possibly base a verdict upon  "evidence" never presented at trial. Appellant, in fact, had no prior criminal record.
Closing argument presents a legitimate opportunity to "argue all reasonable inferences from evidence in the record." (ABA Standards, The Prosecution Function (1971) std. 5.8(a) (hereafter cited as Prosecution Function).) However, this court has for a number of years repeatedly warned "that statements of facts not in evidence by the prosecuting attorney in his argument to the jury constitute misconduct." (People v. Kirkes (1952) 39 Cal.2d 719, 724 [249 P.2d 1]; see also People v. Taylor (1961) 197 Cal. App.2d 372, 381-384 [17 Cal. Rptr. 233].)
*213 Prosecution Function standard 5.9 specifically states: "It is unprofessional conduct for the prosecutor intentionally to refer to or argue on the basis of facts outside the record...."[2]
In the present case, the prosecutor implied that there was additional evidence about the appellant's past known to him but unavailable to the jury. These implications tended to make the prosecutor his own witness  offering unsworn testimony not subject to cross-examination. It has been recognized that such testimony, "although worthless as a matter of law, can be `dynamite' to the jury because of the special regard the jury has for the prosecutor, thereby effectively circumventing the rules of evidence." (Vess, Walking a Tightrope: A Survey of Limitations On The Prosecutor's Closing Argument (1973) 64 J.Crim.L. & Criminology 22, 28; see also Crump, The Function and Limits of Prosecution Jury Argument (1974) 28 Sw.L.J. 505, 517-518.)
It has also been suggested that prosecutorial argument "which goes beyond the evidence admitted may be violative of the Sixth Amendment which provides that every accused has the right to be confronted by the witnesses against him." (National Prosecution Standards, supra, commentary to std. 17.17, p. 280.) For all these reasons, the remarks by the deputy district attorney were improper.
(2) Numerous decisions by our courts suggest that "bad faith must be shown to establish the existence of misconduct...." (People v. Romo (1975) 47 Cal. App.3d 976, 987 [121 Cal. Rptr. 684]; see also People v. Rhinehart (1973) 9 Cal.3d 139, 154 [107 Cal. Rptr. 34, 507 P.2d 642]; People v. Asta (1967) 251 Cal. App.2d 64, 86-87 [59 Cal. Rptr. 206].) For the purpose of deciding whether to reverse a decision or grant a mistrial, this *214 emphasis on intentionality is misplaced. "[I]njury to appellant is nonetheless an injury because it was committed inadvertently rather than intentionally." (Note, The Nature and Consequences of Forensic Misconduct in the Prosecution of a Criminal Case (1954) 54 Colum.L.Rev. 946, 975; see also United States v. Nettl (3d Cir.1941) 121 F.2d 927, 930.) Therefore, to the extent that cases in this jurisdiction imply that misconduct must be intentional before it constitutes reversible error, they are disapproved.[3]
(1b) Despite the deputy district attorney's misconduct in this case, the error involved is not sufficient to merit reversal of appellant's conviction. Reversal of judgment is designed not so much to punish prosecutors as to protect the fair trial rights of defendants. Hence, in the absence of prejudice to the fairness of a trial, prosecutor misconduct will not trigger reversal. (See, e.g., People v. Lambert (1975) 52 Cal. App.3d 905, 911 [125 Cal. Rptr. 404].)
(3) Under traditional application of this state's harmless error rule, the test of prejudice is whether it is "reasonably probable that a result more favorable to the defendant would have occurred had the district attorney refrained from the comment attacked by the defendant. [Citations.]" (People v. Beivelman (1968) 70 Cal.2d 60, 75 [73 Cal. Rptr. 521, 447 P.2d 913].) However, if federal constitutional error is involved, then the burden shifts to the state "to prove beyond a reasonable doubt that the error complained of did not contribute to the verdict obtained." (Chapman v. California (1967) 386 U.S. 18, 24 [17 L.Ed.2d 705, 710, 87 S.Ct. 824, 24 A.L.R.3d 1065].)
(1c) Whatever test of prejudice this court applies to the present case, it is certain that any reasonable jury would have reached the same verdict even in the absence of the prosecutor's remarks.[4] Appellant himself *215 admitted at trial that he did the shooting. The only question for the jury was whether it was done in self-defense. Even if appellant's reconstruction of the day's events were believed entirely, the assault still could not be justified as self-defense. Appellant was clearly the aggressor in the evening's quarrel. He pointed his gun at Hollister at a time when Hollister made no immediate threat against him. When Hollister reached as for a gun, appellant as the aggressor was bound to retreat and not to stand his ground. (People v. Evans (1969) 2 Cal. App.3d 877, 882 [82 Cal. Rptr. 877]; People v. Garcia (1969) 275 Cal. App.2d 517, 523 [79 Cal. Rptr. 833].) However, instead of retreating, appellant fired his gun.
Since appellant's theory of self-defense was insufficient as a matter of law, the prosecutor's misconduct must be held harmless beyond a reasonable doubt. Appellant's own admissions torpedoed his defense.
This court wishes to emphasize that our refusal to reverse appellant's conviction should in no way be taken as condonation for the deputy district attorney's misconduct. A closer case, marred by the same misconduct, might well require reversal. Therefore, this court again "warn[s] prosecutors that they cannot continue with impunity to engage in [improper] conduct thinking that appellate courts will save them by applying the harmless error rule. Convictions have been reversed before, and will continue to be, whenever prejudicial misconduct occurs." (People v. Lambert, supra, 52 Cal. App.3d 905, 912; see also People v. Linden (1959) 52 Cal.2d 1, 27 [338 P.2d 397].)[5]


*216 III
Appellant separately challenges the trial court's decision to deny probation and sentence him to state prison.[6] (4) The granting or denial of probation is a matter for the discretion of the trial court. (People v. Edwards (1976) 18 Cal.3d 796, 807 [135 Cal. Rptr. 411, 557 P.2d 995].) However, "[t]he courts have never ascribed to judicial discretion a potential without restraint." (People v. Russel (1968) 69 Cal.2d 187, 194 [70 Cal. Rptr. 210, 443 P.2d 794].) Discretion is compatible only with decisions "controlled by sound principles of law, ... free from partiality, not swayed by sympathy or warped by prejudice...." (People v. Surplice (1962) 203 Cal. App.2d 784, 791 [21 Cal. Rptr. 826].)
(5) At the sentence hearing the trial judge abused his discretion when he expounded at length on the fact that appellant had several children, all *217 of whom received welfare support and some of whom were borne out of wedlock. The judge stated: "Now, that to me is a crime just as big as a crime of which he was found guilty by the jury. I sound a note of regret that we don't make it a felony when a man goes out and has illegitimate children by the second or third time.... There's your crime in this particular case."
Consideration of a defendant's family life may be highly relevant at a probation and sentence hearing. However, the trial court's remarks were unrelated to any rational attempt to assess the effect appellant's home environment had on his criminal conduct, or was likely to have in the future. Neither the fathering of children out of wedlock nor the receipt of welfare support had any relevance to the question of whether appellant could best be rehabilitated by allowing him to continue normal community contacts. (ABA Standards, Probation (1970), std. 1.2 (ii).) Nor were these factors relevant to the questions of whether confinement was necessary to protect the public from appellant or whether a sentence of probation would "unduly depreciate the seriousness of the offense...." (ABA Standards, Probation, supra, std. 1.3 (a)(i),(iii).)
Instead, the trial judge labeled the fathering of a second or third child out of wedlock as itself a criminal activity and indicated that he was imposing a prison sentence, rather than probation, to punish this conduct as well as the crime for which appellant had been convicted. When counsel asked for reassurance that appellant was not being sentenced to prison for the "crime" of fathering children out of wedlock, the court replied: "I sentenced him for all the reasons stated. You can't go up to a man and blast him with a shotgun and get away lightly. I don't know where Willie Bolton was when I was talking. Really, I am talking about the children, about the background of the report that indicates he is a pillar of society."[7]
This was an insufficient clarification. A trial court's discretion does not extend to basing a sentence, even in part, on the fathering of children out of wedlock or the receipt of welfare. To hold otherwise would be to introduce an invidious discrimination into our sentencing procedures as well as to undermine numerous standards of judicial conduct. (See, e.g., ABA Standards, Appellate Review of Sentences (1968) std. 1.2 (i) and (iv), and commentary; ABA Standards, Probation, supra, stds. 1.2 and *218 1.3.) It would be tantamount to saying that a trial judge could always insulate ungermane and biased remarks at a sentence hearing by concluding his remarks with recital of the "saving" formula that sentence was imposed because of the nature of the crime committed.
In People v. Morales (1967) 252 Cal. App.2d 537, 546 [60 Cal. Rptr. 671], a trial judge was found to have abused his discretion when he imposed a consecutive sentence solely because appellant refused to plead guilty and presented what the judge considered a frivolous defense. The court stated "even if it can be gleaned from the record that the basis of the punishment imposed upon defendant in the instant case was in part the fact that he had availed himself of his right to trial and in part the nature of the crime for which he was convicted, we would be compelled to the same conclusion...." (Ibid.) This reasoning applies equally to the present case.[8]
The cause is remanded to the trial court with instructions to set aside the sentence and to resentence appellant in accordance with the views expressed herein. The judgment of conviction is affirmed.
Tobriner, J., Mosk, J., Richardson, J., Manuel, J., and Newman, J., concurred.
Clark, J., concurred in the judgment.
NOTES
[1]  The pertinent remarks were as follows:

"MR. FITZGERALD: At any rate, [Hollister, the victim] had problems, and he sat up there. He was asked about something he did in 1968, and the Court will tell you and the Court has told you that it is for the limited purpose of showing that back in 1968, he threatened somebody [defense counsel had earlier impeached Hollister by introducing prior felonies]. I objected to that, because I think it is unfair, because I can't do the same thing to the defendant, and there are certain rules of court that favor one side or the other, and I can't do that.
"MR. VEALE [defense counsel]: Your Honor, I object that that's even possible.
"THE COURT: Listen, whether counsel object or not, it is not proper discussion for the jury. The point is, the evidence is in. Proceed.
"MR. FITZGERALD: Thank you, your Honor.
"You people don't know whether or not Clifford Hollister could be afraid of Willie Bolton. You don't know, because that's just the way we do things here. For all you know, he may be just as bad a guy as Clifford Hollister.
"MR. VEALE: Your Honor, I object. He's asking this jury to speculate.
"THE COURT: The Jury is admonished to disregard that. You are not to ask this jury to speculate. You discuss the evidence and not the absence of it."
[2]  This prohibition against using closing argument to introduce new evidence is echoed in several other standards for trial conduct. (See, e.g., Nat. Dist. Attys. Assn., National Prosecution Standards (1977), commentary to std. 17.17, p. 280 (hereafter cited as National Prosecution Standards) ["The courts are, in general, adamant concerning any suggestion from the prosecution that there is other convincing evidence of the defendant's guilt which is not before the jury."]; Nat. Advisory Com. on Crim. Justice Standards and Goals, Courts (1973) std. 4.15 ["... Summations or closing statements by counsel should be limited to the issues raised by evidence submitted during trial...."]; ABA Code of Prof. Responsibility, Ethical Considerations, EC 7-25 (hereafter cited as ABA Code) ["[A] lawyer should not by subterfuge put before a jury matters which it cannot properly consider."]; ABA Code, Disciplinary Rules, DR 7-106C ["[A] lawyer shall not: (1) State or allude to any matter that he has no reasonable basis to believe is relevant to the case or that will not be supported by admissible evidence."]; rule 7-105, Rules Prof. Conduct of the State Bar of Cal. ["[A] member of the State Bar shall: (1) ... not seek to mislead the judge, judicial officer or jury by an artifice or false statement of fact or law."].)
[3]  However, the state of the mind of the offending attorney would remain relevant in any disciplinary proceeding against the attorney himself.
[4]  Courts of this state have generally assumed that prosecutorial misconduct is error of less than constitutional magnitude. (See, e.g., People v. Chi Ko Wong (1976) 18 Cal.3d 698, 723 [135 Cal. Rptr. 392, 557, P.2d 976].) However, Chapman itself recognized that a prosecutor's closing argument could be so improper as to create federal constitutional error. (Chapman v. California, supra, 386 U.S. 18, 25-26 [17 L.Ed.2d 705, 711].) Commentators have also chided courts for downplaying the inroads on a defendant's constitutional rights often accomplished by misconduct. (Singer, Forensic Misconduct by Federal Prosecutors  and How It Grew (1968) 20 Ala.L.Rev. 227, 267; Alschuler, Courtroom Misconduct by Prosecutors and Trial Judges (1972) 50 Tex.L.Rev. 629, 664.)

Though this court need not decide this issue in the present case, it seems probable that the prosecutor's attempt to characterize the defendant as a "bad guy" in violation of the rules of evidence was a violation also of defendant's Sixth Amendment right of confrontation. The prosecutor, serving as his own unsworn witness, is beyond the reach of cross-examination. However, recent decisions of the Supreme Court have noted the importance of cross-examination to the Sixth Amendment right of confrontation. "If one were to translate the Confrontation Clause into language in more common use today, it would read: `In all criminal prosecutions, the accused shall enjoy the right to be present and to cross-examine the witness against him.'" (Dutton v. Evans (1970) 400 U.S. 74, 95 [27 L.Ed.2d 213, 230, 91 S.Ct. 210] (conc. opn. of Harlan, J.); see also California v. Green (1970) 399 U.S. 149, 158-159 [26 L.Ed.2d 489, 497, 90 S.Ct. 1930]; Bruton v. United States (1968) 391 U.S. 123, 136 [20 L.Ed.2d 476, 485, 88 S.Ct. 1620].) And, although the Supreme Court has allowed certain out-of-court statements, never subjected to cross-examination, to be admitted at trial, it has indicated that the absence of cross-examination at the time the out-of-court statement was made is not crucial "as long as the declarant is testifying as a witness and subject to full and effective cross-examination" at trial. (California v. Green, supra, 399 U.S. 149, 158 [26 L.Ed.2d 489, 497].)
Therefore, in cases such as the present one, a strong argument exists that a violation of a constitutional right is involved and the Chapman standard of prejudice should be applied.
[5]  This court is aware that verbal rebuke alone may have little practical effect in deterring prosecutorial misconduct. As one commentator has noted, "Appellate justices time and time again have ... warned prosecutors to keep within the bounds of propriety. Later opinions reflect the result  frustrating failure. The appellate tribunals have found to their dismay that they cannot uphold a conviction and yet successfully condemn the method by which it was secured.... The very act of upholding the conviction has given prosecutors approval, and the `judicial slap on the wrist' has not deterred the prosecutor from his unethical and improper tactics." (Note, Prosecutor Indiscretion: A Result of Political Influence (1959) 34 Ind.L.J. 477, 487; see also Singer, supra, 20 Ala.L.Rev. 227, 269-277.)

The question therefore remains: between outright reversal and mere verbal rebuke, are there intermediate remedies available that may prove effective against prosecutorial misconduct? One possibility is on-the-spot instruction by the trial judge to the jury to ignore the attorney's improper remarks. However, unless the instruction is sharply worded, it may only exacerbate the problem by calling the jurors' attention to the improper remarks. "[M]erely to raise an objection to [improper] testimony  and more, to have the judge tell the jury to ignore it  often serves but to rub it in." (United States v. Grayson (2d Cir.1948) 166 F.2d 863, 871 (conc. opn. of Frank, J.).)
But when the defense counsel requests cautionary instructions, the trial judge certainly must give them if he agrees misconduct has occurred. He should aim to make a statement to the jury that will counteract fully whatever prejudice to the defendant resulted from the prosecutor's remarks. In the present case, such a counterbalancing statement might have taken the following form: "Ladies and Gentlemen of the jury, the prosecutor has just made certain uncalled for insinuations about the defendant. I want you to know that the prosecutor has absolutely no evidence to present to you to back up these insinuations. The prosecutor's improper remarks amount to an attempt to prejudice you against the defendant. Were you to believe these unwarranted insinuations, and convict the defendant on the basis of them, I would have to declare a mistrial. Therefore, you must disregard these improper, unsupported remarks."
Because the appellant was not prejudiced by the deputy district attorney's remarks, this court does not consider today whether the cautionary instructions actually given by the trial judge (ante, fn. 1) would have been sufficient to preserve a fair trial, had appellant been prejudiced.
[6]  The trial judge sentenced appellant to state prison subject to former Penal Code section 1202b (repealed by Stats. 1976, ch. 1139, § 274). The judge imposed no sentence pursuant to Penal Code section 12022.5.
[7]  The probation report had recommended that appellant be granted probation, conditional upon his spending the first year of probation in custody at county jail.
[8]  Because of this disposition, this court need not consider appellant's further argument that the trial judge erred by refusing to allow appellant personally or through his lawyer to respond to the remarks about his children.
