
38 Cal.App.4th 1733 (1995)
45 Cal. Rptr.2d 757
THE PEOPLE, Plaintiff and Respondent,
v.
MICHAEL ALLEN BRADFORD, Defendant and Appellant.
Docket No. C019844.
Court of Appeals of California, Third District.
October 12, 1995.
*1735 COUNSEL
Robert Navarro, under appointment by the Court of Appeal, for Defendant and Appellant.
Daniel E. Lungren, Attorney General, George Williamson, Chief Assistant Attorney General, Robert R. Anderson, Assistant Attorney General, and Roger E. Venturi, Deputy Attorney General, for Plaintiff and Respondent.
OPINION
SIMS, J.
Defendant Michael Allen Bradford was charged by information with the following offenses:


Count                              Violation
 I                        Cultivation of marijuana
                          (Health & Saf. Code, § 11358)
 II                       Possession of marijuana for sale
                          (Health & Saf. Code, § 11359)
 III                      Possession of a deadly weapon
                          (Pen. Code, § 12020, subd. (a))



*1736
 IV                       Vehicle theft
                          (Veh. Code, § 10851, subd. (a))
 V                        Vehicle theft
                          (Veh. Code, § 10851, subd. (a))

It was further alleged defendant was armed with a firearm during the commission of the offenses alleged in counts I and II. (Pen. Code, § 12022, subd. (a)(1).)
Pursuant to a plea bargain, defendant pleaded guilty to counts I and IV; the other charges were dismissed.
As pertinent, defendant was sentenced to the upper term of three years on count I plus one-third of a two-year term on count IV. Execution of sentence was stayed and defendant was placed on probation.
The trial court imposed the upper term on count I because defendant possessed two firearms and because the offense showed planning and premeditation.
On appeal, defendant contends the upper term on count I (cultivation of marijuana) was erroneously imposed. He argues his sentence violates the rule of People v. Harvey (1979) 25 Cal.3d 754 [159 Cal. Rptr. 696, 602 P.2d 396] because all firearm charges were dismissed pursuant to a plea bargain and his possession of the weapons was not transactionally related to the offense of cultivation of marijuana.
We shall conclude the trial court properly used defendant's possession of two loaded shotguns as an aggravating factor because the possession was transactionally related to the crime of cultivation of marijuana.
Pertinent facts are recited in the probation report as follows:
"[O]n May 19, 1994, a district attorney investigator accompanied a social worker to a residence at Gunsmoke Lane, near Highway 36. The social worker was attempting to contact Suzette Valero-Esparza. The property Valero-Esparza resided at included cabins and tent-like structures. The property belonged to John Weigant's father. Valero-Esparza, Weigant, the defendant, and Bryan Ponton were contacted there. Marijuana plants were observed and other officers were summoned. Weigant was seen pulling nine marijuana plants out of the ground.
"Officers found eight small marijuana plants in a bathtub and eight more in a greenhouse-like structure. The plants were two to three inches in height. *1737 Potting soil and numerous pots were found. Approximately one-fourth mile from the compound, officers found eighty-one marijuana plants, two to four feet in height. An additional eleven marijuana plants, two to four feet in height, were found nearby. Four ATV [all terrain vehicle] quadrunners were located in the vicinity of the cabins. An ice chest on one of the vehicles contained eleven, one gallon plastic pots which matched pots found in the greenhouse. Next to another quadrunner, fourteen, one gallon plastic milk containers were present. Numerous buckets and containers were found. The marijuana plants were recently watered.
"One cabin contained identification belonging to Weigant and Valero-Esparza. A loaded 380 semi-automatic pistol was on the headboard of the bed. A small set of weighing scales was found in a dresser. A second cabin contained identification belonging to the defendant. Two loaded shotguns, one of them sawed off, and a flare pistol were in this cabin. A marijuana growers manual was also found, along with marijuana seeds, marijuana pipes, and rolling papers."
Defendant admitted the shotguns belonged to him.

DISCUSSION
In People v. Harvey, supra, 25 Cal.3d 754, defendant pleaded guilty to two counts of robbery (Pen. Code, § 211) and a third count of robbery was dismissed pursuant to a plea bargain.
At sentencing, the trial court used the dismissed robbery count as an aggravating factor to impose the upper term. Holding the trial court erred, the Supreme Court said: "In our view, under the circumstances of this case, it would be improper and unfair to permit the sentencing court to consider any of the facts underlying the dismissed count three for purposes of aggravating or enhancing defendant's sentence. Count three was dismissed in consideration of defendant's agreement to plead guilty to counts one and two. Implicit in such a plea bargain, we think, is the understanding (in the absence of any contrary agreement) that defendant will suffer no adverse sentencing consequences by reason of the facts underlying, and solely pertaining to, the dismissed count. The People have cited no contrary authorities. Although People v. Guevara (1979) 88 Cal. App.3d 86, 92-94 [], upheld the authority of the sentencing court to take into account certain facts underlying charges dismissed pursuant to a plea bargain, those facts were also transactionally related to the offense to which defendant pleaded guilty. As the Guevara court carefully explained, `The plea bargain does not, expressly or by implication, preclude the sentencing court from reviewing all *1738 the circumstances relating to Guevara's admitted offenses to the legislatively mandated end that a term, lower, middle or upper, be imposed on Guevara commensurate with the gravity of his crime.' (P. 94, italics in original.) In contrast, as we have noted, the present case involved a robbery alleged in dismissed count three which was unrelated to, and wholly separate from, the admitted robberies charged in counts one and two." (People v. Harvey, supra, 25 Cal.3d at pp. 758-759.)
Rule 421(a)(2) of the California Rules of Court lists, as an aggravating factor, that, "The defendant was armed with or used a weapon at the time of the commission of the offense."
(1a) In this case, the parties agree that, in order to be considered as a valid aggravating factor, defendant's possession of the shotguns had to be transactionally related to the crime of cultivation of marijuana. They dispute whether a transactional nexus can be shown on this record.
We find guidance in the recent decision of our Supreme Court in People v. Bland (1995) 10 Cal.4th 991 [43 Cal. Rptr.2d 77, 898 P.2d 391]. That case is summarized in the words of the court as follows:
(2) "Penal Code section 12022 imposes an additional prison term for anyone `armed with a firearm in the commission' of a felony. The question we resolve here is this: is a defendant convicted of a possessory drug offense subject to this `arming' enhancement when the defendant possesses both drugs and a gun, and keeps them together, but is not present when the police seize them from the defendant's house? The answer is: yes.
"Possessory drug offenses are continuing crimes that extend throughout a defendant's assertion of dominion and control over the drugs, even when the drugs are not in the defendant's immediate physical presence. Therefore, when the prosecution has proved a charge of felony drug possession, and the evidence at trial shows that a firearm was found in close proximity to the illegal drugs in a place frequented by the defendant, a jury may reasonably infer: (1) that the defendant knew of the firearm's presence; (2) that its presence together with the drugs was not accidental or coincidental; and (3) that, at some point during the period of illegal drug possession, the defendant had the firearm close at hand and thus available for immediate use to aid in the drug offense. These reasonable inferences, if not refuted by defense evidence, are sufficient to warrant a determination that the defendant was `armed with a firearm in the commission' of a felony within the meaning of section 12022." (People v. Bland, supra, 10 Cal.4th at p. 995, fn. omitted.)
(1b) Like possession of drugs, the crime of cultivation of marijuana is a continuing one. The crime continues at least during a period of cultivation *1739 that the defendant undertakes or aids or abets. One need not be physically present at the site of a cultivation in order to be guilty of the offense. "Moreover, the `circumstances' the sentencing judge may look to in aggravation or in mitigation of the crime include `attendant facts,' `the surroundings at the commission of an act.' (Black's Law Dict. (4th ed.) p. 308.) `Circumstances' include `practically everything which has a legitimate bearing' on the matter in issue. [Citations.]" (People v. Guevara (1979) 88 Cal. App.3d 86, 93 [151 Cal. Rptr. 511].)
Here, defendant's loaded shotguns were found in his cabin in a compound dedicated to the cultivation of marijuana. It is undisputed that defendant knew of the presence of the weapons. Nothing suggests the weapons were there by accident. Finally, the record permits the fair inference that defendant was present in his cabin with the weapons at some point during the process of cultivating the marijuana nearby. The record therefore contains substantial evidence showing defendant was armed with the shotguns during the cultivation offense, so that defendant's possession of the weapons was transactionally related to the offense. (People v. Bland, supra, 10 Cal.4th at p. 995.)
Defendant relies on People v. Berry (1981) 117 Cal. App.3d 184 [172 Cal. Rptr. 756]. There, a pistol was found under the driver's seat when defendant was stopped in a stolen vehicle. Defendant entered into a plea bargain whereby he pleaded guilty to vehicle theft (Veh. Code, § 10851) and various weapons charges were dismissed. (People v. Berry, supra, 117 Cal. App.3d at pp. 193-194.) The trial court used, as an aggravating factor, that defendant was armed at the time of the offense. (Id. at p. 190.)
The Court of Appeal said, "The question of whether the possession of the gun was transactionally related to the driving of the vehicle is a close one." (People v. Berry, supra, 117 Cal. App.3d at p. 197.) Nonetheless, the court concluded no transactional relationship existed, reasoning, "There is nothing to show that the defendant used the pistol to obtain or retain possession of the vehicle. He did not drive the vehicle while brandishing the weapon. The vehicle merely served as a container for it." (Ibid.)
Assuming Berry is correctly decided, it is distinguishable. Here, as we have noted, defendant possessed the weapons during the time of cultivation of the marijuana. Moreover, whatever may be said of vehicle theft, it is common knowledge that perpetrators of narcotics offenses keep weapons available to guard their contraband.
We conclude defendant's possession of two loaded shotguns was transactionally related to his crime of cultivation of marijuana. The trial court properly used defendant's possession to impose the upper term.
*1740 The judgment is affirmed.
Sparks, Acting P.J., and Raye, J., concurred.
