Opinion
RICHLI, Acting P. J.—I
INTRODUCTION1
On October 15, 2007, defendant Johnny Lee Bell set fire to some rags, some towels, and a chair that were piled on top of his mother’s car, which was parked in front of her house. He also set fire to some adult diapers and other items near a back gate of the house, causing the gate to catch fire. A neighbor witnessed him setting fire to the items on the car. Defendant was arrested near the house and found to be carrying a lighter.
Prior to trial, defendant’s trial counsel raised a doubt as to defendant’s competency, and a jury trial on his competency was held. Defendant testified against his trial counsel’s recommendation. After defendant was found competent to stand trial, he was convicted by a jury of arson of property and attempt to bum property.
Defendant makes one claim on appeal: The trial court violated his state and federal rights to due process by finding he could testify at his competency trial over his trial counsel’s objection.
We find that trial counsel representing a defendant whose competency is in doubt should be in charge of the trial proceedings, including whether the defendant should testify as to his own competency. As such, the trial court *1075erred by allowing defendant to testify over his trial counsel’s objection. However, we deem such error to be harmless in this case and affirm the judgment.
II
PROCEDURAL BACKGROUND
On February 15, 2008, an amended information was filed by the San Bernardino County District Attorney’s Office charging defendant with arson of an inhabited structure (Pen. Code, § 451, subd. (b))2 and attempt to bum (§ 455). Prior to the trial proceedings, defendant’s trial counsel declared a doubt as to defendant’s competency and requested an evaluation be conducted pursuant to section 1368.3 Defendant was evaluated by mental health staff at the county jail. After reviewing a report based on the evaluation, the trial court expressed a doubt as to defendant’s mental competency, suspended the criminal proceedings, and appointed two doctors to evaluate defendant as set forth in section 1368. The trial court appointed a third doctor after the two previously appointed doctors split in their opinion on defendant’s competency.
The third doctor found defendant competent to stand trial. Defendant’s counsel refused to submit on the doctors’ reports, and a jury trial was held on defendant’s competency. Although trial counsel objected to defendant’s testifying at the competency hearing, as will be discussed in more detail, post, the trial court overruled the objection, and defendant testified on his own behalf. On July 16, 2008, the jury found that defendant was competent to stand trial.
Trial on the substantive charges began on August 21, 2008, in front of a different jury panel. Defendant was found guilty of the lesser offense of arson of property (§451, subd. (d)) and of the attempted arson. The trial court sentenced defendant to the upper term of three years for the arson of property and a concurrent two-year term on the attempted arson.
in
COMPETENCY PROCEEDINGS
Prior to the proceedings, Dr. Joseph Simpson, a psychiatrist; Dr. Lee Guerra, a forensic psychologist; and Dr. Harvey W. Oshrin, a psychiatrist, evaluated defendant and submitted written reports to the trial court. *1076Dr. Simpson found defendant incompetent to stand trial, and Drs. Guerra and Oshrin found him competent. Defendant’s trial counsel refused to submit on the reports, and a jury trial ensued. The reports were not submitted at the competency trial.
Dr. Simpson, who had previously performed over 200 competency evaluations, testified for defendant. After evaluating defendant, he concluded defendant was not competent to stand trial due to a diagnosis of psychotic mental disorder not otherwise specified and defendant’s inability to work with defense counsel in a rational manner. Dr. Simpson explained that a psychosis is a severe mental disorder characterized by hallucinations and delusions, as defined in the Diagnostic and Statistical Manual of Mental Disorders IV (DSM IV).
Dr. Simpson interviewed defendant in jail. Defendant initially was very cooperative in the interview, but he became agitated when they discussed his legal situation. Defendant would not answer basic questions and spoke in a rambling manner, commonly seen in those suffering from psychotic mental disorders. Defendant only talked to Dr. Simpson for 20 minutes and provided little background information before getting up and leaving the interview.
There was other evidence that defendant suffered from delusional behavior, including that his family stated he was taking medication for mental issues and prior medical records that defendant had been put on medication. Further, defendant’s behavior since being incarcerated on the instant charges led to Dr. Simpson’s diagnosis of psychosis. While in jail, defendant had clogged his toilet and allowed it to flood his cell. He then sat on the floor in the water and urine. He did this on several occasions. Defendant would not cooperate with jail staff.
Dr. Simpson reviewed the reports prepared by the two other appointed doctors in which they found defendant competent, but those reports did not change his mind. Defendant would not talk to Dr. Guerra, so his determination that defendant understood the proceedings was flawed. The other report (prepared by Dr. Oshrin) did not explain how defendant was capable of cooperating with counsel.
The facts that defendant lit adult diapers on fire and that he sat in a cell that was flooded were consistent with psychosis and not just antisocial personality disorder. Dr. Simpson agreed that defendant understood the nature of the proceedings against him; however, his mental disorder foreclosed the possibility that he could engage rationally with his trial counsel. Dr. Simpson admitted, however, that this was a close case on competency.
Defendant then testified on his own behalf. He insisted that his character had been assaulted because it was assumed that he had committed the crimes *1077in the instant case, but he was innocent. He stated he was 44 years old, was the father of four children, and had done positive things in the community. He was locked down 24 hours a day in jail and not allowed to see a medical doctor. Defendant complained about being housed with murderers and not being able to watch television. He sat in urine in his cell because he had been tasered, and the jail officials were trying to cover it up.
Defendant went to high school and paralegal school. He got into an automobile accident in 1989, which resulted in his being diagnosed with a mental illness. He denied he took any mental health medication. For the previous 25 years, he had run a nonprofit agency involved in stopping gangs and drugs in his community. Defendant had wanted to represent himself because he was innocent, and his attorney was not working with him.
Defendant indicated that he knew high-ranking officials in San Bernardino, but they had not come to his trial. The case was just a “major coverup.” He indicated that, during the time he represented himself, he went to the law library and studied his case. He researched search and seizure and the basics of his case. He conducted the preliminary hearing himself. He had previously represented himself in a case and had won. He stopped talking with Dr. Simpson when the doctor told him the conversation was not confidential. Defendant would work with his trial counsel but felt that trial counsel had a different agenda. Defendant stated that he was competent to stand trial.
Defendant’s mother, Dessie Walker, testified that defendant started having some mental issues around 1982. Defendant had been in mental health facilities and prescribed psychotropic medication. When he was on his medication, he acted like himself. When he was off the medication, he spent more time alone and was less cooperative.
The People called Dr. Guerra. Dr. Guerra had previously conducted approximately 200 competency evaluations. It was difficult in this case to make a determination of defendant’s mental state because defendant was not cooperative. Defendant only met with him for 15 minutes; the doctor liked to have one- to two-hour interviews. Dr. Guerra had insufficient evidence to diagnose defendant with a mental disorder.
Dr. Guerra reviewed the record from the jail, Dr. Simpson’s report, an interview between the district attorney and defendant’s mother, and defendant’s prior criminal history. Defendant’s competency had not been questioned in the criminal cases that defendant was charged in prior to the instant case. His jail records showed no documentation of a mental disorder. Dr. Guerra believed that defendant might have a cognitive disorder from the prior automobile accident.
*1078Defendant clearly understood the court process. There were no issues regarding defendant’s competency during the time defendant represented himself. Defendant was initially cooperative with Dr. Guerra. Dr. Guerra believed defendant discontinued the interview with him because he did not want to talk to him, not because he was psychotic. Based on his testimony in court, Dr. Guerra strongly believed that defendant was competent to stand trial. He had no opinion on defendant’s relationship with trial counsel.4
IV
DEFENDANT’S RIGHT TO TESTIFY AT A SECTION 1368 COMPETENCY PROCEEDING
Defendant contends on appeal that his state and federal rights to due process were violated by the trial court allowing him to testify at his competency hearing over the objection of his trial counsel.5
A. Additional Factual Background
Prior to the trial on defendant’s competency, defendant’s trial counsel sought to restrict the questioning of defendant, should he testify, on the particulars of the offense with which he was charged. The trial court indicated that if defendant testified, the prosecution would be limited in its cross-examination to those issues raised on direct examination.
Defense counsel then stated for the record: “Well, I’d like to put on the record, since my position and [defendant]’s position are polar opposites, that it wouldn’t be myself who would be calling him to testify. It would be his own volition. [Defendant] might testify. Thus, it’s not as if I were, quote, calling him. So that’s why I’m advancing this in limine motion. We have someone who is . . . not entirely competent to proceed. Yet is insisting on proceeding. So I’m doing my best to protect him.”
The trial court responded, “Well it appears clear from the case law that [defendant] does have the right to testify in this proceeding. If his personal position is contrary to the position you’re advocating in terms of his competency ... I think we’re just going to have to play it by ear as to how this testimony plays out.”
*1079When defendant was called to the stand, defense counsel stated on the record, in front of the jury, “[Defendant], you realize that this proceeding puts me and you at adverse . . . positions. You have one position, I have another position. So I’m going to let you speak to the jury in your own words, okay.” Defendant then testified in narrative form as set forth, ante. Defendant’s trial counsel also refused to examine defendant.
The jury found defendant competent to stand trial. Just prior to trial on the substantive charges, defendant refused an offer for two years to be served locally.
B. Analysis
1. Defendant’s right to testify at a section 1368 competency hearing
Initially, the People contend that the instant issue has been waived because defense counsel never objected to defendant testifying at the competency hearing. Defense counsel merely stated that he did not want defendant to be subject to cross-examination on the charges. Although we think it was clear to the trial court, and on the record before us, that defendant’s trial counsel objected to defendant testifying, even if it was not, once the trial court stated that it believed case law supported that defendant could testify over counsel’s recommendation, it would have been futile for counsel to object. (People v. Anderson (2001) 25 Cal.4th 543, 587 [106 Cal.Rptr.2d 575, 22 P.3d 347] [“[c]ounsel is not required to proffer futile objections”].)
“ ‘Both the due process clause of the Fourteenth Amendment to the United States Constitution and state law prohibit the state from trying or convicting a criminal defendant while he or she is mentally incompetent. [Citations.] A defendant is incompetent to stand trial if he or she lacks a “ ‘sufficient present ability to consult with his lawyer with a reasonable degree of rational understanding—[or lacks] ... a rational as well as a factual understanding of the proceedings against him.’ ” [Citations.]’ [Citation.]” (People v. Lewis (2008) 43 Cal.4th 415, 524 [75 Cal.Rptr.3d 588, 181 P.3d 947].)
California law provides, “(a) If, during the pendency of an action and prior to judgment, a doubt arises in the mind of the judge as to the mental competence of the defendant, he or she shall state that doubt in the record and inquire of the attorney for the defendant whether, in the opinion of the attorney, the defendant is mentally competent. ... At the request of the defendant or his or her counsel or upon its own motion, the court shall recess the proceedings for as long as may be reasonably necessary to permit counsel *1080to confer with the defendant and to form an opinion as to the mental competence of the defendant at that point in time, [f] (b) If counsel informs the court that he or she believes the defendant is or may be mentally incompetent, the court shall order that the question of the defendant’s mental competence is to be determined in a hearing which is held pursuant to Sections 1368.1 and 1369. If counsel informs the court that he or she believes the defendant is mentally competent, the court may nevertheless order a hearing. Any hearing shall be held in the superior court.” (§ 1368.) Section 1369 provides that a hearing on competency can either be by the court or a jury trial, and “[i]t shall be presumed that the defendant is mentally competent unless it is proved by a preponderance of the evidence that the defendant is mentally incompetent.” (Id., subd. (f); see also People v. Ramos (2004) 34 Cal.4th 494, 507 [21 Cal.Rptr.3d 575, 101 P.3d 478]; People v. Stanley (1995) 10 Cal.4th 764, 817 [42 Cal.Rptr.2d 543, 897 P.2d 481].)
A defendant’s trial counsel can raise a doubt as to defendant’s competency and can even waive a jury trial over a defendant’s objection. (People v. Masterson (1994) 8 Cal.4th 965, 971-973 [35 Cal.Rptr.2d 679, 884 P.2d 136] (Masterson).) However, the issue of whether a defendant has a right to testify at his competency hearing over the objection of his own counsel has not been considered by our Supreme Court.
“The defendant in a criminal proceeding has a right to testify over the objection of his or her counsel. As [the Supreme Court] ha[s] explained in that context, ‘the right to testify in one’s own behalf is of such fundamental importance that a defendant who timely demands to take the stand contrary to the advice given by his counsel has the right to give an exposition of his defense before a jury. [Citation.] The defendant’s insistence upon testifying may in the final analysis be harmful to his case, but the right is of such importance that every defendant should have it in a criminal case. Although normally the decision whether a defendant should testify is within the competence of the trial attorney [citation], where, as here, a defendant insists that he wants to testify, he cannot be deprived of that opportunity.’ [Citation.]” (People v. Allen (2008) 44 Cal.4th 843, 860 [80 Cal.Rptr.3d 183, 187 P.3d 1018], italics added (Allen).) However, “[although it arises in the context of a criminal trial, a competency hearing is a special proceeding, governed generally by the rules applicable to civil proceedings. [Citation.]” (People v. Lawley (2002) 27 Cal.4th 102, 131 [115 Cal.Rptr.2d 614, 38 P.3d 461]; see also People v. Hill (1967) 67 Cal.2d 105, 114 & fn. 3 [60 Cal.Rptr. 234, 429 P.2d 586].)
There is support from the Supreme Court for the conclusion that trial counsel can choose not to allow his client to testify even over the objection of his client at a competency hearing. In Masterson, the trial court had declared *1081a doubt as to the defendant’s competency and ordered a competency hearing. At the time of the jury trial, there were only 11 available jurors to try the case, and trial counsel stipulated with the People to have the case heard by an 11-person jury over his client’s objection. (Masterson, supra, 8 Cal.4th at pp. 967-968.) The Supreme Court granted review on the question whether “ ‘the statutory right to a jury trial in a mental competency hearing pursuant to Penal Code sections 1368 and 1369 [is] subject to waiver over the objection of the defendant.’ ” (Id. at p. 968.)6
The Masterson court first noted that there was no constitutional right to a jury trial in a competency proceeding. (Masterson, supra, 8 Cal.4th at p. 969.) It then went on to analyze the unique nature of competency proceedings as opposed to criminal and civil proceedings. It noted, “The sole purpose of a competency proceeding is to determine the defendant’s present mental competence, i.e., whether the defendant is able to understand the nature of the criminal proceedings and to assist counsel in a rational manner. [Citations.] Because of this, the defendant necessarily plays a lesser personal role in the proceeding than in a trial of guilt. How can a person whose competence is in doubt make basic decisions regarding the conduct of a proceeding to determine that very question?” (Id. at p. 971.)
The Supreme Court noted that several prior cases (e.g., People v. Hill, supra, 67 Cal.2d 105 and People v. Samuel (1981) 29 Cal.3d 489 [174 Cal.Rptr. 684, 629 P.2d 485]) had concluded that a defendant need not be advised of his right to a jury trial in a competency proceeding prior to conducting a bench trial. The only difference in Masterson was that the defendant there specifically objected to the bench trial. (Masterson, supra, 8 Cal.4th at pp. 972-973.) However, the Supreme Court found the same reasoning for not requiring that a defendant be advised of his right to a jury trial applied to the situation where a defendant objects to a bench trial: “[T]hat counsel need not entrust key decisions to the client also compel[s] the conclusion that the client may not veto those same decisions. Whether or not the client objects, counsel must be allowed to do what counsel believes is best in determining the client’s competence.” (Id. at p. 973.)
The Supreme Court then addressed the presumption that a defendant is competent until it is “proved by a preponderance of the evidence that the defendant is mentally incompetent.” (§ 1369, subd. (f); see Masterson, supra, 8 Cal.4th at pp. 973-974.) It found, “The presumption is a rule of procedure; it cannot negate the fact the court here declared a doubt as to defendant’s *1082competence. The rationale underlying Samuel and Hill—that the person whose competence is in question cannot be entrusted to make basic decisions regarding the conduct of that proceeding—is unaffected by the presumption.” {Masterson, 8 Cal.4th at p. 974.)
The Supreme Court concluded, “In sum, we hold that counsel may waive a jury trial in a proceeding to determine whether the defendant is competent to stand trial on criminal charges, and may make other decisions regarding a jury trial, even over the defendant’s objection.” (Masterson, supra, 8 Cal.4th at p. 974.)
Other appellate courts have concluded that a defendant does have a right to testify in competency proceedings. In People v. Harris (1993) 14 Cal.App.4th 984 [18 Cal.Rptr.2d 92] (Harris), the defendant was disruptive in court and had to be removed. In his absence, the trial court declared a doubt as to the defendant’s competence, and the defendant’s trial counsel agreed. (Id. at pp. 988-989.) The trial court tried to explain the defendant’s rights to him under section 1368, but to no avail. A psychiatrist was appointed to examine the defendant, but the defendant would not speak to him. The psychiatrist determined the defendant was incompetent. The case returned to the trial court for the section 1368 proceedings. The defendant was not present, and his trial counsel waived his presence. In the defendant’s absence, he was declared incompetent at a bench trial after counsel waived a jury trial. (Harris, at p. 989.) The defendant appealed the incompetency determination. (Id. at p. 990.)
Among other claims raised on appeal, the defendant insisted that his trial counsel could not waive a jury trial in his absence, claiming that he had a fundamental constitutional right to a jury trial in a section 1368 proceeding. {Harris, supra, 14 Cal.App.4th at pp. 990-991.) The Harris court rejected there was a constitutional right to a jury trial; the right to a jury trial was merely statutory, and counsel could waive this statutorily created right. {Id. at pp. 991-992.)
The Harris court then addressed the defendant’s claim that trial counsel could not waive his presence at trial. Without deciding whether the defendant had a due process right to be present, the court concluded his absence from the proceeding was not prejudicial. {Harris, supra, 14 Cal.App.4th at p. 993.)
The Harris court went on to state, “It appears appellant’s real complaint is not merely that he was excluded from the hearing, but that his attorney proceeded to prove his incompetence without affording appellant the opportunity to testify in support of his claim that he was competent. We would agree with appellant that, at a minimum, when defense counsel seeks to prove *1083defendant’s incompetence over his or her objection, and the defendant expresses the desire to testify that he or she is competent, counsel should permit defendant to so testify, unless the court separately determines that the defendant is incompetent to do so. This procedure was approved in People v. Bolden (1979) 99 Cal.App.3d 375 [160 Cal.Rptr. 268].” (Harris, supra, 14 Cal.App.4th at pp. 993-994, fn. omitted.)
In a footnote, the court additionally stated, “In [Bolden] the court held that it was not ineffective assistance of counsel or a due process violation for a defense attorney to prove the defendant’s incompetence over his or her objection. The court also implicitly approved defense counsel’s solution to the dilemma caused by the conflict between counsel and client, which was to permit the defendant to testify in support of his contention that he is competent, but to then offer expert evidence of his incompetence.” (Harris, supra, 14 Cal.App.4th at p. 994, fn. 4.)
In People v. Bolden, supra, 99 Cal.App.3d 375 (Bolden), the trial court raised a doubt as to the defendant’s competency, but the defendant disagreed. Trial counsel believed the defendant was incompetent but was tom between pursuing his Ghent’s wishes and doing what was in his client’s best interests. Trial counsel determined the best course of action was to allow the defendant to testify that he was competent and to present psychiatric evidence that he was incompetent. (Id. at pp. 377-378.)
On appeal, the Bolden court addressed whether the defendant’s right to effective assistance of counsel was violated by his appointed counsel’s seeking to have him found incompetent despite the defendant’s desire to be found competent. (Bolden, supra, 99 Cal.App.3d at p. 379.) The Bolden court held, “Diligent advocacy does not require an attorney to blindly follow every desire of his client. An attorney can ordinarily make binding waivers of many of his client’s rights as to matters of trial tactics [citation]. When the attorney doubts the present sanity of his client, he may assume his client cannot act in his own best interests and may act even contrary to the express desires of his client [citation]. To do otherwise may cause prejudicial error [citation].” (Id. at pp. 379-380.)
Here, defendant contends not only that the conclusion in Harris is dicta, but also that Bolden does not hold as stated by the Harris court. We agree with defendant that the holding in Harris is dicta. There was no indication the defendant in that case wanted to testify or that his counsel would object to that testimony. (Harris, supra, 14 Cal.App.4th at p. 994, fn. 4.) Further, we agree that Bolden is limited to the holding that counsel does not provide ineffective assistance by raising his client’s incompetency when the defendant does not want to be declared incompetent. Although in Bolden the defense *1084attorney chose to have his client testify, the appellate court did not in any way rule that the defendant had a right to testify or that such procedure was necessary.
Based on the rationale in Masterson, we believe that trial counsel should make the decision as to whether a defendant whose competency has been questioned by the trial court should testify at the competency hearing. In some cases, such as in Bolden, it may make sense for trial counsel to have a defendant testify if counsel believes the testimony supports that he or she is incompetent. However, we agree with Masterson that “counsel must be allowed to do what counsel believes is best in determining the client’s competence.” (Masterson, supra, 8 Cal.4th at p. 973.) If trial counsel believes it is best that his client not testify, it should be counsel’s decision to make. We find the trial court here erred by allowing defendant to testify over counsel’s objection.
The People appear to rely upon the recent decision in Allen, supra, 44 Cal.4th 843 to support that a defendant has a right to testify at a competency hearing. The issue presented in Allen was whether a defendant in a proceeding to be committed as a sexually violent predator has a state or federal constitutional right to testify over the objection of his counsel. (Id. at p. 848.) The Allen court found that although a defendant in a criminal proceeding has a federal and state constitutional right to testify over the objection of counsel, because a proceeding to commit an individual as a sexually violent predator is civil in nature, the right of a criminal defendant to testify over the objection of counsel does not extend to an individual who is the subject of a civil commitment proceeding under the Sexually Violent Predator Act (SVPA). (Allen, at p. 862.)
However, the Allen court continued its analysis, finding that, “ ‘[b]ecause civil commitment involves a significant deprivation of liberty, a defendant in an SVP[A] proceeding is entitled to due process protections. [Citation.]’ [Citations.] [f] ‘ “Once it is determined that [the guarantee of] due process applies, the question remains what process is due.” [Citation.]’ ” (Allen, supra, 44 Cal.4th at p. 862.) It then concluded, after reviewing the factors applicable to a due process analysis, that “the defendant in a sexually violent predator proceeding has a right under the due process clauses of the federal and state Constitutions to testify, in accordance with the rules of evidence and procedure, over the objection of counsel.” (Id. at p. 870.)
SVPA proceedings, however, are unlike competency determinations. The main concern in a competency proceeding is protection of the accused from being tried in a criminal proceeding while he or she is incompetent, while an SVPA proceeding is initiated in order to protect society from *1085sexually violent predators. (See Harris, supra, 14 Cal.App.4th at p. 995; People v. Bye (1981) 116 Cal.App.3d 569, 576 [172 Cal.Rptr. 186].) Further, competency proceedings do not rise to the same level of restriction of liberty as those proceedings to commit a sexually violent predator. (Bye, at pp. 576-577.) The decision in Allen relied extensively on the factor that the defendant’s liberty interests were at stake. (See Allen, supra, 44 Cal.4th at pp. 869-870.) Since the right to testify in Allen was decided in the context of sexually violent predator proceedings, its findings are not applicable here and changed nothing regarding the finding in Masterson.
The concurring and dissenting opinion also follows the analysis and reasoning in Allen, finding that, as in Allen, a defendant’s liberty interest is at stake in a section 1368 proceeding, and therefore it violates a defendant’s due process rights under the federal and state Constitutions to allow his counsel to determine whether the defendant should testify. However, the concurring and dissenting opinion does not acknowledge that a section 1368 hearing is only conducted if the trial court declares a doubt as to a defendant’s competence. Although the concurring and dissenting opinion rejects that Masterson, supra, 8 Cal.4th 965, is applicable here (because it involved the waiver of a defendant’s statutory right to a jury trial), the Supreme Court clearly established in Masterson “that the person whose competence is in question cannot be entrusted to make basic decisions regarding the conduct of that proceeding ____” (Id. at p. 974.)
Moreover, “ ‘[i]t is [also] a fundamental canon of criminal law, and a foundation of due process, that “[a] person cannot be tried or adjudged to punishment while such person is mentally incompetent.” ’ [Citation.]” (Masterson, supra, 8 Cal.4th at p. 968.) This competing due process right was not present in Allen. As stated in People v. Bye, supra, 116 Cal.App.3d at page 576, “[e]ven when a defendant resists this protection by opposing the evidence of incompetency, it would be unfair to deny him the benefit of treatment for his condition before subjecting him to a potential loss of life or liberty in the criminal proceeding.” Defendant has a due process right not to be tried while he is incompetent, and we believe that his counsel is in the best position to determine whether defendant should testify in order to protect this right. We differ fundamentally with the concurring and dissenting opinion that a defendant—about whom the trial court has declared a doubt as to competency—should be vested with the decision to testify in a section 1368 proceeding. “Whether or not the [defendant] objects, counsel must be allowed to do what counsel believes is best in determining the [defendant’s] competence.” (Masterson, supra, 8 Cal.4th at p. 973.)
It is clear that a section 1368 proceeding is different from other criminal and civil commitment proceedings in that its purpose is to protect the *1086defendant. In that proceeding, we believe that, once it is established that a trial court has a doubt as to a defendant’s competency, it should be counsel’s decision whether it is best that a defendant testify. We therefore find the trial court committed error by allowing defendant to testify over his counsel’s objection.
2. Prejudice
In finding that the trial court erred by allowing defendant to testify over his counsel’s objection, we must determine if such finding requires reversal of the competency determination. In other words, we must determine whether defendant would have been found incompetent if trial counsel had been successful in keeping out defendant’s testimony at the competency hearing.
Defendant claims that review is subject to the harmless-beyond-a-reasonable-doubt standard of Chapman v. California (1967) 386 U.S. 18, 24 [17 L.Ed.2d 705, 87 S.Ct. 824]. Defendant argues, “Here . . . [defendant] had a due process right not to be tried in a criminal case when he was incompetent to stand trial. The court’s ruling to allow [defendant] to testify in the narrative, based on the justification that [defendant] had a ‘right to testify’ over the objection of defense counsel, violated [defendant]’s due process rights, requiring reversal unless the prosecution can demonstrate that the error was harmless beyond a reasonable doubt.” Defendant’s argument fails for two reasons. First, it assumes that defendant is incompetent. However, the evidence does not support such a conclusion. Further, it assumes that defendant had a due process right to testify, but we have found none.
Based on the foregoing, we believe that the error that occurred here was merely the erroneous admission of evidence, which we review under People v. Watson (1956) 46 Cal.2d 818, 836 [299 P.2d 243] to determine whether there is a reasonable probability that defendant would have been found incompetent absent his testimony. Moreover, even if we were to conclude that the error was of constitutional dimension and applied the Chapman standard, we would find it harmless. (See People v. Johnwell (2004) 121 Cal.App.4th 1267, 1277-1278 [18 Cal.Rptr.3d 286] [in reviewing instructional error in competency proceeding the court found that such error implicated the defendant’s fundamental right not to stand trial while incompetent and therefore must be reviewed under the Chapman standard].)
Here, two experts testified regarding defendant’s competency. Dr. Simpson found him incompetent, and Dr. Guerra found him competent. However, Dr. Simpson admitted that a third doctor (Dr. Oshrin) had also found defendant competent. Dr. Simpson further admitted that whether defendant was incompetent was a close question, while Dr. Guerra was certain of his evaluation.
*1087Defendant’s testimony was rambling and at times incoherent. The jury could have just as reasonably viewed defendant’s rambling as evidence of his incompetence. The jury certainly would not just accept defendant’s declaration that he was competent. In fact, they were instructed that they must view all the evidence before accepting one witness’s version of the facts. (CALCRIM No. 301.) We do not believe that defendant’s testimony had any impact on the determination of his competency.7
Moreover, defendant’s additional claims of prejudice are purely speculative. He claims that had he been found incompetent and been medicated, he might have been able to assist counsel at trial in raising a viable defense, or he might have accepted the two-year plea offer prior to trial. We have no way of knowing whether he would have accepted the plea bargain and cannot speculate how his trial would have been different had he been medicated.
Based on the foregoing, we find that the trial court’s erroneous admission of defendant’s testimony at his competency hearing over trial counsel’s objection was harmless.
V
DISPOSITION
The judgment is affirmed.
Gaut, J., concurred.
Because they are not pertinent to the issue presented on appeal, we provide only a brief summary of the facts of the underlying case.
All further statutory references are to the Penal Code unless otherwise indicated.
Defendant represented himself at the preliminary hearing. Counsel was appointed on February 28, 2008.
Dr. Oshrin was not called by the People.
We agree with the People that in normal circumstances when a defendant receives the relief requested in the lower court (e.g., defendant wanted to testify, and his request was granted) he cannot cry “foul” on appeal. However, as will be discussed, post, competency proceedings present a unique circumstance that requires this court to ensure that a defendant’s best interests were protected during the competency proceedings.
We note that the People have stated in their brief that defendant should have brought a writ on the issue presented on appeal. However, this case is procedurally identical to Masterson, where the issue was reviewed on direct appeal, and we have found no support that in order to contest a competency finding, a writ must first be filed.
Since the issue is not before us, we need not decide the appropriate remedy (reversal of the conviction or a retrospective competency hearing) had we concluded that the evidence of his testimony was in fact prejudicial, and he could have been found incompetent.