Petitioner Kenneth R. Graham appeals the district court’s denial of his habeas corpus petition challenging his sentence enhancement for being personally armed with a firearm under CaLPenal Code § 12022(c). A conviction under § 12022(c) requires proof that the defendant knew of the firearm’s existence and was in a position to access it for offensive or defensive use. See, e.g., People v. Mendival, 2 Cal. App.4th 562, 575, 3 Cal.Rptr.2d 566 (1992). Graham alleges that his due process rights were violated because there was insufficient evidence to prove that he knew of the presence of firearms.
Although we review the district court’s denial of a habeas petition de novo, Lockhart v. Terhune, 250 F.3d 1223, 1228 (9th Cir.2001), we must accord deference to the state court decision because Graham’s petition is governed by the Antiterrorism and Effective Death Penalty Act of 1996 (“AEDPA”). 28 U.S.C. § 2254(d). Under AEDPA, we may disturb a state court’s determination only if it was “contrary to” or “involved an unreasonable application of’ clearly established law as determined by the Supreme Court. Williams v. Taylor, 529 U.S. 362, 407, 120 S.Ct. 1495, 146 L.Ed.2d 389 (2000). Therefore, in order to grant a writ in this case, we must find that the state court unreasonably applied the standard for analyzing sufficiency of the evidence claims: “whether, after viewing the evidence in the light most favorable to the prosecution, any rational trier of fact could have found the essential elements of the crime beyond a reasonable doubt.” Jackson v. Virginia, 443 U.S. 307, 319, 99 S.Ct. 2781, 61 L.Ed.2d 560 (1979).
The California Court of Appeal concluded that a reasonable juror could infer that Graham knew about the firearms based upon the fact that the guns were kept next to drugs in the bedroom of the house where he and his fellow co-defendants ran their drug enterprise. The court noted that, in People v. Bland, the California Supreme Court stated that a jury may reasonably infer that the defendant knew about the firearm where “the evidence at trial shows that a firearm was found in close proximity to the illegal drugs in a place frequented by the defendant.” 10 Cal.4th 991, 1002-03, 43 Cal.Rptr.2d 77, 898 P.2d 391 (1995).
Graham contends that Bland is inapplicable to the facts of his case because multiple defendants were present. The jury’s inference of knowledge in Bland was straightforward as the firearm was found next to the drugs in the defendant’s own home and no one else was involved in the underlying crime. Here, Graham was one of five individuals arrested and there was no direct evidence showing that he knew that the guns were hidden in the bedroom.
The California Court of Appeal acknowledged that the evidence in this case presents a close question but nevertheless concluded that the jury was entitled to infer, based on Graham’s participation in the joint enterprise to sell cocaine, that he was not only aware of the drugs but also was aware of the firearms. See People of Territory of Guam v. Cepeda, 851 F.2d 1564, 1568 (9th Cir.1988) (“Inferred factual conclusions based on circumstantial evidence are permitted only when, and to the extent that, human experience indicates a probability that certain consequences can and do follow from the basic circumstantial facts.”). The fact that we might have ruled otherwise is immaterial. We are not at liberty to grant a writ of habeas corpus simply because we find the state court’s *19decision erroneous. The decision must be objectively unreasonable. Lockyer v. Andrade, 538 U.S. 63, 123 S.Ct. 1166, 1174, 155 L.Ed.2d 144 (2003).
In reviewing the facts of this case, we cannot say that the state court of appeal’s conclusion that the evidence was sufficient to permit a rational trier of facts to infer that Graham had knowledge of the firearms was an objectively unreasonable application of the Jackson standard. Therefore, in light of our limited review under AEDPA, we affirm the decision of the district court.
AFFIRMED.