
105 Cal.Rptr.2d 285 (2001)
87 Cal.App.4th 1253
The PEOPLE, Plaintiff and Respondent,
v.
Oday MOUNSAVENG, Defendant and Appellant.
No. F033224.
Court of Appeal, Fifth District.
March 22, 2001.
Review Granted July 11, 2001.
*287 Jim Fahey, under appointment by the Court of Appeal, for Defendant and Appellant.
Bill Lockyer, Attorney General, David P. Druliner, Chief Assistant Attorney General, Robert R. Anderson, Assistant Attorney General, Jeffrey D. Firestone and Lloyd G. Carter, Deputy Attorneys General, for Plaintiff and Respondent.


*286 OPINION
LEVY, J.
Between July 1996 and December 1996, appellant, Oday Mounsaveng, participated in five separate criminal undertakings. In the aftermath of this crime spree, appellant was tried by the court and found guilty of one count of first-degree murder (Pen.Code,[1] § 187), 13 counts of robbery (§§ 211 and 212.5), and two counts of attempted robbery (§§ 664, 211 and 212.5). Appellant did not deny his involvement in these crimes. Rather, he asserted that he acted under duress.
Appellant challenges his conviction on the ground that the trial court applied the incorrect burden of proof to his duress defense. The trial court analyzed this defense under a preponderance of the evidence standard, rather than determining whether appellant raised a reasonable doubt that he acted in the exercise of his free will. We hold the federal constitutional standard of review must be applied and, thus, the trial court erred. However, we conclude this error was harmless beyond a reasonable doubt. Therefore, the judgment must be affirmed.

STATEMENT OF THE CASE AND FACTS
The prosecution's case against appellant encompassed five incidents. The first occurred on July 31, 1996, when appellant and his codefendant, Vaene Sivongxxay, attempted to rob the Thanh Tin jewelry store. During his third visit to the store that day, appellant grabbed the owner by the neck and pointed a gun at her head. However, the robbery was interrupted by the store's alarm. As soon as it sounded appellant and Sivongxxay fled.
On August 16, 1996, appellant and Sivongxxay robbed the JMP Mini Mart. On this occasion, Sivongxxay brandished a gun while appellant took money from the register, and grabbed cigarettes and other items. They also took a bank bag containing $8,000. At one point Sivongxxay ordered the store's owner to the floor and then kicked him in the head.
The next robbery took place on October 10, 1996. Appellant and Sivongxxay entered the Phnom Penh jewelry store a few minutes apart. Appellant had had a pendant repaired during an earlier visit and wanted further work done on it. However, *288 after the owner sat down to do the requested repair, appellant and Sivongxxay pulled him away from his chair, held their guns to his head and beat him. After tying the owner up, appellant demanded access to the cash in the store from the owner's wife. Meanwhile, Sivongxxay collected displayed jewelry. Appellant and Sivongxxay left with approximately $30,000 in cash and merchandise.
The JMP Mini-Mart was the target for a second time on December 14, 1996. Appellant and Sivongxxay burst through the door wielding handguns and ordered everyone inside to get down on the floor. Thereafter, they victimized the owner and seven customers. One customer, an elderly woman, sustained physical injuries when Sivongxxay kicked her in the mouth and hit her on the head. Appellant and Sivongxxay left with money and property, including the owner's handgun that appellant had taken from under the counter.
The final robbery took place on December 19, 1996. Appellant and Sivongxxay entered the Sean Hong jewelry store where Sivongxxay had left a pendant to be repaired a few weeks earlier. After Sivongxxay and appellant examined the repaired pendant, they pulled out their guns and pointed them at the store's owners, Seak Ang Hor and Henry Song. Appellant screamed "`give [me] the money and gold'" and forced Song toward the cash register. Hor and Song were thereafter ordered to the back room where the safe was. However, Hor crawled away. She then banged and kicked on a wall in a desperate attempt to alert her neighbors.
Appellant and Sivongxxay left the store after taking approximately $30,000 to $40,000 in cash and jewelry. Hor returned to the back room and saw that Song was on the floor bleeding. Apparently, Song and Sivongxxay had engaged in a struggle. Song was shot three times by Sivongxxay and died from his wounds.
A store video surveillance camera recorded parts of this robbery. From this tape, law enforcement was able to identify Sivongxxay and appellant. Based on photographs distributed by the Fresno Police Department, appellant was arrested in Minnesota on February 7, 1997. Sivongxxay was arrested five days later.
Appellant and Sivongxxay were both charged with the first-degree murder of Henry Song. (§ 187.) A special circumstance was alleged in that the murder occurred during a robbery. (§ 190.2, subd. (a)(17).) The information further charged both defendants with 14 counts of robbery and one count of attempted robbery. (§§ 211, 212.5 and 664.) Weapons and personal firearm use enhancements were also alleged. (§§ 12022 and 12022.5.)
The prosecution sought the death penalty. Appellant waived a jury trial and both he and Sivongxxay were tried jointly before the court.
In defending these charges, appellant did not contest his involvement in the robberies. Instead, appellant claimed he acted under duress. Appellant outlined a sequence of events that precipitated his participation in both the charged and several uncharged robberies.
Appellant testified that the coercion began in December 1995, approximately one year before the murder took place. While appellant and his girlfriend, Kathy Sengphet, were at the hospital with their youngest child, appellant received a telephone call from a man that he knew as "Turre." Turre asked appellant to meet him at a certain location. However, after appellant arrived there with his other young son, appellant was tied up and he and the child were kidnapped. Turre, an African-American man named "Frank" and a third man appellant believed to be Sivongxxay drove appellant around in his car for approximately 90 minutes. Appellant was asked if he had any money to pay a debt owed by his friend "Lut." Appellant did not and he and his son were eventually released.
*289 Appellant returned to the hospital and told Sengphet what had happened. At first Sengphet did not believe him. However, later that evening appellant and Sengphet saw the same three men standing near their house. Thereafter, Sengphet reported the matter to the police.
Following this kidnapping, appellant drove to Visalia and stayed with a friend. About two weeks later appellant returned to Fresno. However, appellant was afraid for himself and his family. Appellant and Sengphet then moved to Portland, Oregon, to stay with appellant's parents.
Nevertheless, this move did not prove to be a successful escape. Turre soon found appellant in Portland. On January 17, 1996, Turre and two other Asian men appeared at appellant's parents' house and asked appellant for money. Appellant responded that he did not have any. The men then pointed a gun at appellant and told him to go with them. Appellant refused and the men left. A short time later a car drove by and three or four shots were fired at the house.
A few weeks later appellant and Sengphet moved back to Fresno with their children. Then, around May 1996, Turre approached appellant again. Turre, Sivongxxay, and a third Asian man told appellant that they would contact him and he would have to help rob a store at that time. Appellant testified he was scared so he answered "`Yes, do not disturb my family, myself.'"
Sivongxxay and two other men made contact with appellant about a month and a half later. They ordered appellant to accompany them while they robbed a store. Appellant agreed to act as the getaway driver because he was afraid. However, appellant was not charged with this robbery.
A second uncharged robbery took place one or two weeks later. Again appellant drove the getaway car. Appellant stated that Sivongxxay threatened to "`do something'" to his family if he did not participate.
With respect to the charged robberies, appellant testified that his involvement was forced through fear. He further claimed that his gun was unloaded and that he never received any of the cash or loot.
Following the murder, appellant fled to Los Angeles because he was scared. From there he went to Minnesota to join Sengphet and the children. Sengphet had been in Minnesota since September.
As part of the closing argument, the prosecutor asserted that appellant had not proved his duress defense by a preponderance of the evidence. Defense counsel did not disagree with the prosecutor's choice of standard. Rather, counsel argued that appellant had met this burden.
Thereafter, the trial court found both defendants guilty of one count of first-degree murder, 13 counts of robbery, and two counts of attempted robbery. The special circumstance enhancement, the weapons enhancements, and the prior convictions were all found to be true. With regard to the murder, the court ruled that Sivongxxay was the actual killer and that appellant aided and abetted the underlying robbery with "a clear, reckless indifference to human life as a major participant."
In ruling on appellant's duress defense, the court stated:
"The Court has considered the affirmative defenses of duress raised directly by [appellant] and somewhat indirectly through his statement to Detective Wells raised by defendant Sivongxxay. I find insufficient evidence of duress to rise to a standard of preponderance of the evidence as to each defendant.
"[Appellant] has established a prima facie case that would lead me to believe there is the possibility that his initial entry into the robbery consortium that Mr. Sivongxxay and possibly others were in, however, this is not proof rising to a probability, and would only apply *290 to uncharged robberies that were testified to by [appellant]. It is clear that inin between the time of those uncharged robberies that he testified to and the chargedthe first charged offense in this case, he had ample opportunity to alert authorities to protect himself and his family, long periods of time unaccompanied by any other persons who were in a position to threaten him or his family with any imminent peril or danger.

"Having found the duress as to each defendant does not rise to the level of a preponderance of the evidence, but at best would be evenly balanced, the Court need not address the more technical legal issues of applicability of duress to the various types of offenses involved in this case.
"The court simply finds insufficient evidence of that duress to affect any of these charges or enhancements." (Emphasis added.)
Appellant was sentenced to life without the possibility of parole on the murder conviction. An additional total term of 53 years was imposed for the other counts, prior convictions and enhancements. Sivongxxay was sentenced to death.

DISCUSSION
Appellant's challenge to his conviction focuses on the burden of proof the court applied to his duress defense. According to appellant, by assessing appellant's defense under a preponderance of the evidence standard, the court imposed an improper burden of proof and thus violated his federal constitutional rights. Appellant's analysis is correct up to this point. However, as discussed below, appellant's final conclusion is not. Contrary to appellant's position, reversal is not required.
The duress defense is recognized by statute in section 26, subdivision six, as follows:
"All persons are capable of committing crimes except those belonging to the following classes: [¶] ...
"SixPersons (unless the crime be punishable with death) who committed the act or made the omission charged under threats or menaces sufficient to show that they had reasonable cause to and did believe their lives would be endangered if they refused."
Duress is effective as a defense only when the actor responds to an immediate and imminent danger. (People v. Heath (1989) 207 Cal.App.3d 892, 900, 255 Cal.Rptr. 120.) If the fear is engendered by the threat of future or non-life threatening violence, it will not relieve the person of responsibility for the crime. (Ibid.; People v. Richards (1969) 269 Cal.App.2d 768, 774, 75 Cal.Rptr. 597.)
When acting under duress, the person does not have time to formulate either a reasonable and viable course of conduct or criminal intent. (People v. Condley (1977) 69 Cal.App.3d 999, 1012, 138 Cal.Rptr. 515.) Rather, the coercing party supplies the requisite mens rea and is liable for the crime. (Ibid.) Thus, the duress defense negates an element of the crime charged, i.e., the capacity to commit the offense as defined in section 26. (People v. Beach (1987) 194 Cal.App.3d 955, 973, 240 Cal.Rptr. 50.) Consequently, the defendant need only raise a reasonable doubt that he acted in the exercise of his free will. (People v. Heath, supra, 207 Cal.App.3d at p. 900, 255 Cal.Rptr. 120.)
A related but distinguishable defense that is often confused with duress is necessity. Necessity also presents an emergency situation that threatens physical harm and lacks an alternative legal course of action. However, unlike duress, the threatened harm is in the immediate future. The defendant has some time, although it may be limited, to consider alternative courses of conduct. (People v. Heath, supra, 207 Cal.App.3d at p. 901, 255 Cal.Rptr. 120.) Thus, necessity does *291 not negate the intent element. Instead, the defense represents a public policy decision not to punish the individual. In effect, the necessity defense is a plea in avoidance and justification that comes into focus only after all elements of the offense have been established. (People v. Beach, supra, 194 Cal.App.3d at p. 973, 240 Cal. Rptr. 50.) Therefore, in contrast to the reasonable doubt standard for a duress claim, the defendant has the burden of proving necessity by a preponderance of the evidence. (People v. Heath, supra, 207 Cal.App.3d at p. 901, 255 Cal.Rptr. 120.)
Here, it is clear from the trial court's comments that it applied a preponderance of the evidence standard to appellant's duress defense. This was error. Appellant was not claiming that necessity compelled him to participate in the crimes.
Under established law, an error that relieves the prosecution of the burden of proving each element of the charged offense beyond a reasonable doubt violates the defendant's due process rights under both the Unites States and the California Constitutions. (People v. Flood (1998) 18 Cal.4th 470, 479-80, 76 Cal.Rptr.2d 180, 957 P.2d 869.) Since duress negates the mens rea element of the crime, the defendant need only raise a reasonable doubt that he acted under the exercise of his own free will. Thus, when the trial court required appellant to demonstrate duress by a preponderance of the evidence, it lightened the prosecution's burden of proof. This shift in the burden of proof is analogous to relieving the prosecution of proving beyond a reasonable doubt that the defendant had the capacity to commit the charged offense. Consequently, appellant's due process rights were violated.
The next issue is what standard of review should be applied to this error. For purposes of California law, the prejudicial effect of this error is subject to review under the test set forth in People v. Watson (1956) 46 Cal.2d 818, 836-837, 299 P.2d 243. (People v. Flood, supra, 18 Cal.4th at p. 490, 76 Cal.Rptr.2d 180, 957 P.2d 869.) Under the Watson standard this court would determine whether there is a "reasonable probability" that the result would have been more favorable to the appellant absent the error. (Ibid.) However, since the subject error also implicates the federal Constitution, the more stringent federal standards of review must be applied.
For purposes of the federal Constitution, an error in the trial process itself is subject to a harmless error analysis as set forth in Chapman v. California (1967) 386 U.S. 18, 87 S.Ct. 824, 17 L.Ed.2d 705. (People v. Flood supra, 18 Cal.4th at p. 503, 76 Cal.Rptr.2d 180, 957 P.2d 869.) In contrast, there are a limited number of "structural errors" that require automatic reversal. (Ibid.)
A structural error is a defect that affects the framework within which the trial proceeds. Such defects include a total deprivation of the right to counsel, the lack of an impartial trial judge, the unlawful exclusion of jurors of the defendant's race, the denial of the right to self-representation at trial, and the denial of the right to a public trial. (People v. Flood, supra, 18 Cal.4th at p. 500, 76 Cal.Rptr.2d 180, 957 P.2d 869.) However, the vast majority of constitutional errors fall within the broad category of trial error subject to harmless error review under Chapman. (Id. at p. 503, 76 Cal.Rptr.2d 180, 957 P.2d 869.)
Trial errors have been characterized as "those that occur `during the presentation of the case to the jury, and which may therefore be quantitatively assessed in the context of other evidence presented in order to determine whether [the error] was harmless beyond a reasonable doubt.'" (People v. Flood, supra, 18 Cal.4th at p. 493, 76 Cal.Rptr.2d 180, 957 P.2d 869.) Such errors include giving an instruction that impermissibly lightens the prosecution's burden of proof on an element of the offense. (Rose v. Clark (1986) 478 U.S. 570, 579-582, 106 S.Ct. 3101, 92 L.Ed.2d 460.)
Here, because appellant had a court trial, jury instructions were not given. Nevertheless, the court's application *292 of the incorrect burden of proof on appellant's duress defense was akin to improperly instructing a jury on that issue. Consequently, we hold that appellant's conviction should not be set aside if this court can confidently say on the entire record that the constitutional error was harmless beyond a reasonable doubt, i.e., the error did not contribute to the court's verdict. (Rose v. Clark, supra, 478 U.S. at p. 576, 106 S.Ct. 3101.)
As noted above, the trial court found that appellant had established a prima facie case of duress with respect to his initial entry into the robbery consortium. Nevertheless, the court found duress was not a valid defense. According to the court, the proof of duress did not rise to the level of a preponderance of the evidence. Applying this preponderance standard was error. However, the court specifically limited this finding to the uncharged robberies. Thus, this error could not have contributed to the verdict.
The court thereafter made a finding with respect to appellant's defense to the charged crimes. The court determined it was clear that between the time of the uncharged robberies and the first charged robbery appellant "had ample opportunity to alert authorities to protect himself and his family, long periods of time unaccompanied by any other persons who were in a position to threaten him or his family with any imminent peril or danger." As explained below, it is this finding that establishes beyond a reasonable doubt that the trial court's application of the incorrect burden of proof did not contribute to the verdict.
In United States v. Bailey (1980) 444 U.S. 394, 100 S.Ct. 624, 62 L.Ed.2d 575, the Supreme Court discussed the defenses of duress and necessity. Although modern cases have tended to blur the distinctions between these two concepts, the court noted that one principle remains constant. "[I]f there was a reasonable, legal alternative to violating the law, `a chance both to refuse to do the criminal act and also to avoid the threatened harm,' the defenses will fail." (Id. at p. 410, 100 S.Ct. 624.)
Thus, pursuant to the rule set forth in Bailey, the trial court's finding that appellant had the opportunity to alert the authorities condemns appellant's duress defense. He had the ability to refuse to participate in the robberies and to avoid the threatened harm. Under these circumstances, the trial court's application of an incorrect burden of proof to appellant's defense is inconsequential. The existence of reasonable and legal options alone caused appellant's defense to fail.
Appellant contends that United States v. Bailey is not controlling in this case because it analyzes federal criminal law. Appellant notes that the duress defense exists in California pursuant to the Penal Code and that neither the statute nor the applicable jury instruction includes a "no-lawful-alternative prerequisite."
However, this prerequisite was adopted by a California court in People v. Heath, supra, 207 Cal.App.3d at p. 900, 255 Cal. Rptr. 120. Additionally, the Bailey rule is a logical underpinning of the duress defense. If the defendant has a reasonable, legal alternative to violating the law, such as notifying law enforcement following the first coercive incident, he is neither responding to an immediate and imminent threat nor acting without the requisite mens rea. In other words, the situation could have been avoided. Thus, contrary to appellant's position, the concept of available alternatives is not limited to necessity. Under United States v. Bailey and People v. Heath the trial court properly incorporated this prerequisite into its analysis of appellant's duress defense.

DISPOSITION
The judgment is affirmed.
VARTABEDIAN, A.P.J., and HARRIS, J, concur.
NOTES
[1]  All further statutory references are to the Penal Code.
