                    FOR PUBLICATION
  UNITED STATES COURT OF APPEALS
       FOR THE NINTH CIRCUIT

UNITED STATES OF AMERICA,                       No. 07-50232
                Plaintiff-Appellee,                D.C. No.
               v.                               CR-06-00711-
JUAN DONALDO PERDOMO-ESPANA,                       MLH-1
             Defendant-Appellant.
                                                 OPINION

         Appeal from the United States District Court
           for the Southern District of California
          Marilyn L. Huff, District Judge, Presiding

                   Submitted March 5, 2008*
                      Pasadena, California

                       Filed April 14, 2008

   Before: Kim McLane Wardlaw, Ronald M. Gould, and
             Sandra S. Ikuta, Circuit Judges.

                    Opinion by Judge Gould




  *The panel unanimously finds this case suitable for decision without
oral argument. See Fed. R. App. P. 34(a)(2).

                                3883
3886             UNITED STATES v. PERDOMO-ESPANA
                             COUNSEL

Elizabeth A. Missakian, San Diego, California, for the
defendant-appellant.

Karen P. Hewitt, United States Attorney, Bruce R. Castetter,
Assistant U.S. Attorney, Chief, Appellate Section, Criminal
Division, and Steven De Salvo, Assistant U.S. Attorney, San
Diego, California, for the plaintiff-appellee.


                              OPINION

GOULD, Circuit Judge:

   Juan Perdomo-Espana (“Perdomo”) appeals his jury con-
viction for one count of illegal entry into the United States as
a deported alien in violation of 8 U.S.C. § 1326. In this opin-
ion, we consider whether the defense of necessity that Per-
domo advanced must be tested under an objective or
subjective standard. We have jurisdiction pursuant to 28
U.S.C. § 1291. Determining that the necessity defense
requires an objective analysis, we affirm the district court’s
denial of Perdomo’s request for a jury instruction on the
defense of necessity.

                                    I

   In the early morning hours of March 21, 2006, a United
States border patrol officer found Perdomo and four others
hiding in brush near the United States-Mexican border. Per-
domo was wearing dark clothes. Upon discovery, Perdomo
admitted that he is a Mexican citizen with no documents to
allow him to enter or to remain in the United States. He was
found with $598 (USD) and 155 Mexican pesos on his per-
son. Perdomo was arrested and taken to a nearby border patrol
station, where he was questioned and fingerprinted.1 Immigra-
  1
   Although a foreign substance on his fingers obscured the prints, subse-
quent fingerprints confirmed Perdomo’s identity, showing a match to fin-
                 UNITED STATES v. PERDOMO-ESPANA                     3887
tion records revealed that he had twice previously been
deported and had not subsequently applied for reentry.

   At trial, Perdomo testified that he had illegally entered the
United States for fear of his life. Perdomo stated that in 2000,
while in a United States federal prison, he had a stroke precip-
itated by a high blood sugar level associated with Type 2 dia-
betes, and thereafter he was treated with insulin injections.
Upon his release from prison, Perdomo was given a small
insulin supply and was removed to Mexico on March 7, 2006,
where his insulin supply soon ran out. While in Tijuana, Per-
domo purchased varying kinds of replenishing insulin, but
none of the insulin was sufficiently effective, and his blood
sugar level began to rise.

   According to Perdomo, shortly before the border patrol
caught him, he tried to enter the United States via the pedes-
trian lane at a nearby port of entry, but was turned away
despite telling the officers of his need for diabetic-related treat-
ment.2 Perdomo claims that his blood sugar level soon there-
after rose to 480, the level it had reached when he suffered his
diabetes-induced stroke. Perdomo asserted that he then
attempted to cross clandestinely into the United States.

   Perdomo testified that he entered the United States fearing
for his life because of his high blood sugar levels, and did not
intend to remain. He believed he was in desperate need of
medical treatment which was unavailable in Mexico. Perdomo
testified that he did not go to any hospital, church, or the
police in Tijuana because he believed that he would not be

gerprints retrieved when Perdomo had previously been deported. A
forensics expert testified at trial to her opinion that a foreign substance
such as Crazy Glue had obscured the fingerprints. Perdomo denied putting
anything on his fingers to obscure his prints.
   2
     A border patrol custodian of records did not find any record of this
alleged attempt to cross the border at the pedestrian lane.
3888           UNITED STATES v. PERDOMO-ESPANA
able to secure the needed treatment in Tijuana, despite the
money he carried. According to Perdomo, a person had to be
dying on the street to gain medical attention there.

   During questioning that took place about four to five hours
after his initial capture, Perdomo told a border patrol agent for
the first time that he is a Type 2 diabetic and that he had been
hospitalized for two weeks in the last six months because of
his diabetes. Perdomo displayed no cuts, bruising, shaking,
tremors, excessive sweatiness, signs of malnourishment, or
apparent strange behavior. However, when questioned
whether he now or in the past had experienced weakness, sig-
nificant weight loss, and fear of losing his mind, Perdomo
responded affirmatively.

   After questioning, Perdomo was taken to an emergency
room, where his blood sugar level was recorded as 340. The
emergency room physician who treated Perdomo, Dr. Vincent
Knauf, characterized this glucose level as a “severe eleva-
tion.” However, Dr. Knauf concluded that, in his opinion, Per-
domo was not facing serious or imminent risk of bodily harm
at that time; although he needed longer-term care, Perdomo
was classified as a “non-urgent” patient.

   Perdomo attributed the drop in blood sugar levels from his
alleged earlier measure of 480 to the food he had eaten at the
border patrol station, suggesting that it had been his experi-
ence that eating food causes his blood sugar level to decrease.
However, Dr. Knauf indicated that he saw nothing to support
Perdomo’s claim that his blood sugar levels had recently been
as high as 480; on the contrary, Dr. Knauf explained, he was
not familiar with any foods that would cause blood sugar
levels to go down, rather only some foods that would not pre-
cipitate as great an increase as others. He also offered that
there are various forms of insulin, all of which will cause
some response in their recipients, though of varying degrees
of sufficiency. Moreover, intravenous injection of saline solu-
tion provides the “quickest reduction of the blood sugar
               UNITED STATES v. PERDOMO-ESPANA              3889
level[,] far quicker than insulin does.” Dr. Knauf testified that
it was his impression that someone with $600, in Perdomo’s
alleged condition the night he was caught by border patrol,
would be able to visit a clinic in Tijuana for effective medical
treatment.

  During pre-trial hearings, Perdomo requested to present a
necessity defense, which the government moved to preclude.
Reserving its final ruling until after the presentation of evi-
dence at trial, the district court allowed Perdomo to testify
before the jury about why he had entered the country.

   At the conclusion of evidence, Perdomo again requested
that the jury be instructed on his proffered defense of neces-
sity. The district court declined to give the requested instruc-
tion, reasoning that Perdomo showed no “threat of imminent
harm,” and that it was “incredulous to suggest that Mexico
doesn’t have clinics, doctors, [or] hospitals, that could man-
age people who are in need of treatment,” especially given
that Perdomo “had $600 on him at the time.” The district
court, instead, instructed the jury that the “theory of the
defense” was that Perdomo had come to the United States for
medical care. After the jury found Perdomo guilty, Perdomo
moved for a new trial, which the district court denied. Per-
domo appeals the district court’s denial of his request for a
necessity defense jury instruction.

                               II

   Although the parties dispute the proper standard for review-
ing the district court’s decision to exclude Perdomo’s prof-
fered jury instruction, our case law is clear on this point:
When reviewing a district court’s denial of a defendant’s
requested jury instruction, the standard of review we use
depends on the specific issue we are reviewing, and “reflect[s]
the relative competencies and functions of the appellate and
district courts.” See United States v. Heredia, 483 F.3d 913,
921 (9th Cir. 2007) (en banc). When the parties dispute the
3890              UNITED STATES v. PERDOMO-ESPANA
sufficiency of a proposed jury instruction’s factual founda-
tion, we review for abuse of discretion. See United States v.
Daane, 475 F.3d 1114, 1119 (9th Cir. 2007); United States v.
Hairston, 64 F.3d 491, 493 (9th Cir. 1995). However, when
the parties dispute a legal determination by the trial court, we
review de novo. See United States v. Batterjee, 361 F.3d
1210, 1216 (9th Cir. 2004); United States v. Wiseman, 274
F.3d 1235, 1240 (9th Cir. 2001); Hairston, 64 F.3d at 493.
Hence, we review de novo the legal question whether the
necessity defense requires an objective inquiry. Once we have
resolved that legal question, we review for abuse of discretion
whether there is a sufficient factual basis for Perdomo’s prof-
fered jury instruction.3

                                    III

   [1] A defendant is entitled to have the jury instructed on his
or her theory of defense, as long as that theory has support in
the law and some foundation in the evidence. United States v.
Mason, 902 F.2d 1434, 1438 (9th Cir. 1990). A defendant
“has the right to have a jury resolve disputed factual issues.
However, where the evidence, even if believed, does not
establish all of the elements of a defense, . . . the trial judge
need not submit the defense to the jury.” United States v.
Arellano-Rivera, 244 F.3d 1119, 1125 (9th Cir. 2001) (inter-
nal quotation marks and alteration omitted), see also United
  3
    Perdomo cites United States v. Schoon, 971 F.2d 193, 195 (9th Cir.
1992) for the proposition that we review de novo a district court’s decision
to bar a necessity defense. Schoon holds that we review de novo the ques-
tion whether a “defendant’s offer of proof[ ] is insufficient as a matter of
law to support the proffered defense.” Id. (internal quotation marks omit-
ted); see also United States v. Cervantes-Flores, 421 F.3d 825, 828 (9th
Cir. 2005), cert. denied, 126 S. Ct. 1911 (2006); United States v. Arellano-
Rivera, 244 F.3d 1119, 1125-26 (9th Cir. 2001). However, that principle
is of limited relevance here; in those cases, the trial court precluded the
defendant from presenting evidence in support of a necessity defense. In
this case, the district court allowed the evidence to be presented to the
jury, but not the corresponding jury instruction that Perdomo had
requested.
               UNITED STATES v. PERDOMO-ESPANA              3891
States v. Lopez, 885 F.2d 1428, 1433 n.5 (9th Cir. 1989),
overruled on other grounds by Schmuck v. United States, 489
U.S. 705 (1989) (“[It] is well established that a criminal
defendant is entitled to have a jury instruction on any defense
which provides a legal defense to the charge against him and
which has some foundation in the evidence, even though the
evidence may be weak, insufficient, inconsistent, or of doubt-
ful credibility. In the necessity context, the proper inquiry is
whether the evidence offered by a defendant, if taken as true,
is sufficient as a matter of law to support the defense.” (inter-
nal citations and quotation marks omitted)).

   [2] “[T]he defense of necessity, or choice of evils, tradi-
tionally covered the situation where physical forces beyond
[an] actor’s control rendered illegal conduct the lesser of two
evils.” United States v. Bailey, 444 U.S. 394, 410 (1980). In
recent years, our case law has expanded the scope of the
defense. We have held that a defendant may present a defense
of necessity to the jury as long as the defendant “establish[es]
that a reasonable jury could conclude: (1) that he was faced
with a choice of evils and chose the lesser evil; (2) that he
acted to prevent imminent harm; (3) that he reasonably antici-
pated a causal relation between his conduct and the harm to
be avoided; and (4) that there were no other legal alternatives
to violating the law.” Arellano-Rivera, 244 F.3d at 1125-26
(internal quotation marks omitted). A defendant must prove
each of these elements to present a viable necessity defense.
See id.

   Perdomo’s principle argument is that these elements
require a subjective analysis and that the relevant inquiry is
thus into his state of mind—i.e., his allegedly genuine fear of
the likely, dire medical consequences that he would have
faced if he did not illegally reenter the United States. By con-
trast, the government asserts that the inquiry is an objective
one. We agree with the government.

   [3] A careful reading of our cases on the subject reveals
that we assess a defendant’s proffered necessity defense
3892           UNITED STATES v. PERDOMO-ESPANA
through an objective framework. In United States v. Schoon,
971 F.2d 193 (9th Cir. 1992), we applied an objective stan-
dard in assessing the fourth element of a necessity defense.
See id. at 198. We stated that “the law implies a reasonable-
ness requirement in judging whether legal alternatives exist.”
Id. Moreover, Arellano-Rivera reiterated our definition of the
third element of a necessity defense as including a reasonable-
ness requirement: The defendant must “reasonably antici-
pate[ ] a causal relation between his conduct and the harm to
be avoided.” Arellano-Rivera, 244 F.3d at 1126 (emphasis
added).

  In United States v. Simpson, 460 F.2d 515 (9th Cir. 1972),
moreover, while discussing justification defenses more
broadly, we said:

    The theoretical basis of the justification defenses is
    the proposition that, in many instances, society bene-
    fits when one acts to prevent another from intention-
    ally or negligently causing injury to people or
    property. That benefit is lost, however, and the the-
    ory fails when the person seeking to avert the antici-
    pated harm does not act reasonably.

Id. at 517-18. Embedded in our recognition that a person who
seeks to benefit from a justification defense must act reason-
ably is the principle that justification defenses necessarily
must be analyzed objectively.

   Schoon echoed this principle: “Necessity is, essentially, a
utilitarian defense. It therefore justifies criminal acts taken to
avert a greater harm, maximizing social welfare by allowing
a crime to be committed where the social benefits of the crime
outweigh the social costs of failing to commit the crime.”
Schoon, 971 F.2d at 196 (internal citation omitted). We con-
tinued: “The law could not function were people allowed to
rely on their subjective beliefs and value judgments in deter-
mining which harms justified the taking of criminal action.”
               UNITED STATES v. PERDOMO-ESPANA             3893
Id. at 197. The latter statement follows logically from the for-
mer statement; after all, if the necessity defense were entirely
subjective, then allowing a defendant to benefit from it would
only advance the common good when the defendant’s subjec-
tive beliefs were in alignment with an objective perspective.

   More recently in Arellano-Rivera, we upheld the district
court’s preclusion of a defendant’s proffered necessity
defense, reasoning that the defendant had failed to show that
he had no legal alternatives other than illegally reentering the
United States. Arellano-Rivera, 244 F.3d at 1126. We denied
the defendant’s appeal, notwithstanding his speculation that
the Attorney General would have denied the defendant’s
application for reentry based on his advanced medical condi-
tion; the defendant’s subjective belief that this legal alterna-
tive was unavailable to him was insufficient to sustain his
necessity defense. Id.; see also United States v. Dorrell, 758
F.2d 427, 431 (9th Cir. 1985) (concluding that the defendant
is not entitled to present the defense of necessity because the
evidence, even if believed, could not establish that the defen-
dant “reasonably anticipated” that his criminal conduct would
avert the harm he sought to avoid).

   [4] We therefore hold that the test for entitlement to a
defense of necessity is objective. The defendant must estab-
lish that a reasonable jury could conclude that (1) he was
faced with a choice of evils and reasonably chose the lesser
evil; (2) he reasonably acted to prevent imminent harm; (3) he
reasonably anticipated a causal relation between his conduct
and the harm to be avoided; and (4) he reasonably believed
there were no other legal alternatives to violating the law. See
Arellano-Rivera, 244 F.3d at 1125-26; Schoon, 971 F.2d at
195; Dorrell, 758 F.2d at 430-31. It is not enough, as Per-
domo argues, that the defendant had a subjective but unrea-
sonable belief as to each of these elements. Instead, the
defendant’s belief must be reasonable, as judged from an
objective point of view.
3894           UNITED STATES v. PERDOMO-ESPANA
                               IV

   [5] Applying an objective standard to Perdomo’s case, his
argument that he was entitled to a jury instruction on the
necessity defense fails on several bases. Dr. Knauf concluded
that Perdomo was in no immediately dire medical condition
when he was treated in the emergency room soon after cross-
ing the border; thus Perdomo’s crossing was not averting any
objective, imminent harm, causing his defense to fail on the
second element. Additionally, Dr. Knauf testified that there
are multiple clinics in Tijuana where Perdomo could have
obtained medical treatment, particularly with the money he
had, and that, even assuming that his medical condition had
been dire, a saline injection would have been the fastest effec-
tive means of bringing Perdomo’s condition under control;
thus there objectively were legal alternatives to violating the
law, causing Perdomo’s defense to fail on the fourth prong.
Moreover, from an objective perspective, Perdomo’s tactic of
hiding in bushes, in dark clothing, and in a remote area, trying
to escape border patrol’s detection, likely thwarted rather than
advanced the speedy receipt of medical treatment, meaning
that the defense fails on the third prong as well.

   Failure on any one of these three bases, let alone all three,
was sufficient to support the district court’s determination that
Perdomo did not present adequate evidence to establish a
prima facie case of the necessity defense. Our case law is
clear that a trial judge may decline to allow evidence of a
necessity defense where the defendant fails to present a prima
facie case. See, e.g., Arellano-Rivera, 244 F.3d at 1125
(“Where the evidence, even if believed, does not establish all
of the elements of a defense, . . . the trial judge need not sub-
mit the defense to the jury.” (internal quotation marks and
alteration omitted)); see also United States v. Cervantes-
Flores, 421 F.3d 825, 828-29 (9th Cir. 2005), cert. denied,
126 S. Ct. 1911 (2006). All the more so, then, a trial court
may preclude a jury instruction after having heard evidence at
               UNITED STATES v. PERDOMO-ESPANA             3895
trial that collectively presents an insufficient factual founda-
tion to establish the defense as a matter of law.

  [6] Perdomo was not entitled to a jury instruction regarding
necessity in this case because the defense lacked a necessary
foundation in evidence. Even if Perdomo’s testimony were
believed, he did not establish all of the elements of the
defense of necessity. See United States v. Yarbrough, 852
F.2d 1522, 1541 (9th Cir. 1988). The district court properly
analyzed Perdomo’s case under an objective framework and
did not abuse its discretion when it denied Perdomo’s
requested jury instruction.

  AFFIRMED.
