
35 Cal.App.4th 1171 (1995)
41 Cal. Rptr.2d 816
SHERRI LYNN DUTTON, a Minor, etc., Plaintiff and Appellant,
v.
CITY OF PACIFICA et al., Defendants and Respondents.
Docket No. A063613.
Court of Appeals of California, First District, Division One.
June 20, 1995.
*1173 COUNSEL
Gwilliam, Ivary, Chiosso, Cavalli & Brewer and Steven R. Cavalli for Plaintiff and Appellant.
McDowall, Cotter, Dunn, Vale & Bracco, Robert D. Vale, David S. Rosenbaum and Susan M. Schectman for Defendants and Respondents.
Ariel Pierre Calonne, City Attorney (Palo Alto), William B. Mayfield, Assistant City Attorney, Mayer, Coble & Palmer, Paul R. Coble and Michael J. Stedman as Amici Curiae on behalf of Defendants and Respondents.
OPINION
DOSSEE, J.
Plaintiff Sherri Lynn Dutton (Dutton), through her guardians ad litem, appeals from a judgment in favor of defendants City of Pacifica (the City) and Pacifica Police Officer Anthony Risso (Risso). Dutton contends that the trial court's order granting summary judgment must be reversed because there is a triable issue of material fact as to whether Risso owed her a duty of care. We disagree and affirm.

I. FACTUAL AND PROCEDURAL BACKGROUND
On August 17, 1991, Dutton was seriously injured when the truck in which she was riding failed to negotiate a left turn. Following the accident, Dutton filed a complaint against the City, Risso, and a number of other defendants. The complaint alleged that the City and Risso were liable because Risso had negligently ordered Dutton to ride in the back of the truck. On May 18, 1993, the City and Risso filed a motion for summary judgment. In connection with the motion, the following facts were established.
On the evening in question, Dutton arrived at Frontierland Park in a van driven by Larry Shores (Shores). The van was carrying four passengers besides Shores and Dutton. Steve Thomas Quinn (Quinn) and two passengers arrived at the park in Quinn's truck. The bed of Quinn's truck was covered by a camper shell. The truck was parked on the street and not within the confines of the park.
Eventually, Shores left the park area in his van. Shortly thereafter, Risso arrived and approached Quinn and a friend, who were standing behind Quinn's truck. The seven other people present, including Dutton, jumped into the cab of the truck. Risso told Quinn to leave because the park closed at 11 p.m. and because the City had an 11 p.m. curfew for minors. Quinn told Risso that he was waiting for Shores and that his father did not want anyone to ride in the back of the truck. While Risso and Quinn were talking, Shores drove past the park in his van, but Quinn did not tell Risso that *1174 Shores was passing by. Risso advised Quinn that he could not wait for anyone, to "[g]et everybody out of here," and that "if you guys don't get out of here, curfew will be enforced." During the encounter, Risso also inspected Quinn's driver's license. Quinn was a minor and had only been licensed to drive for a few months.
According to Dutton's declaration, "[a]fter Officer Risso ordered us to leave the [p]ark, I told him that I only lived up the street, and could walk home. [¶] Officer Risso did not acknowledge what I said, he just ordered everyone to get into the truck. [¶] If I had been given a choice, I would have walked home from the [p]ark.... [¶] ... [¶] Officer Risso did not give me any alternative to riding in the back of Steve Quinn's truck." Dutton lived approximately six blocks or one mile from the park.
The group left the park area in Quinn's truck between 10:45 and 11 p.m. The roads were wet. After leaving, Quinn dropped two girls off at a residence northwest of the park. As the group was leaving the residence, Quinn saw Shores drive by in his van but made no effort to stop him. Quinn then drove west to the opposite side of town to drop off another girl. Shortly after this stop, Quinn lost control of his truck while making a left turn. Approximately one-half hour ensued between the time the group left the park area and the time of the accident. At no point during this time period did Quinn instruct any of the passengers riding in the back of the truck, including Dutton, to get out of the truck.
On June 18, 1993, the trial court granted summary judgment in favor of Risso but denied summary judgment as to the City. On July 27, 1993, after considering supplemental briefing, the trial court reversed itself and granted summary judgment in favor of both defendants. The trial court subsequently entered judgment in favor of the City and Risso, concluding that "as a matter of law there is no triable issue of material fact with respect to a duty owed by defendants herein to [Dutton]. The court also finds that as a matter of law there is no triable issue of material fact with respect to breach of duty on the part of defendants herein." Dutton has filed a timely notice of appeal.

II. DISCUSSION
(1a) Dutton contends that Risso owed her a duty of care because he took "affirmative action which contributed to, increased, or changed the risk which would have otherwise existed." (Williams v. State of California (1983) 34 Cal.3d 18, 27 [192 Cal. Rptr. 233, 664 P.2d 137].) In support of this contention, she points to her declaration, which states that Risso "just ordered everyone to get into the truck." (Ante, this page.) Assuming that this *1175 order was given, as we must at the summary judgment stage, we conclude that it did not give rise to a duty of care.
(2) The question of whether a duty exists is a question of law and must be decided by the court on a case-by-case basis. (Ballard v. Uribe (1986) 41 Cal.3d 564, 572-573, fn. 6 [224 Cal. Rptr. 664, 715 P.2d 624]; Lopez v. McDonald's Corp. (1987) 193 Cal. App.3d 495, 506-507 & fn. 6 [238 Cal. Rptr. 436]; Scott v. Chevron U.S.A. (1992) 5 Cal. App.4th 510, 515 [6 Cal.Rpr.2d 810].) "[I]n considering the existence of `duty' in a given case several factors require consideration including `the foreseeability of harm to the plaintiff, the degree of certainty that the plaintiff suffered injury, the closeness of the connection between the defendant's conduct and the injury suffered, the moral blame attached to the defendant's conduct, the policy of preventing future harm, the extent of the burden to the defendant and consequences to the community of imposing a duty to exercise care with resulting liability for breach, and the availability, cost, and prevalence of insurance for the risk involved. [Citations.]' [Citations.] When public agencies are involved, additional elements include `the extent of [the agency's] powers, the role imposed upon it by law and the limitations imposed upon it by budget....' [Citations.]" (Thompson v. County of Alameda (1980) 27 Cal.3d 741, 750 [167 Cal. Rptr. 70, 614 P.2d 728, 12 A.L.R.4th 701]; see also Peterson v. San Francisco Community College Dist. (1984) 36 Cal.3d 799, 806 [205 Cal. Rptr. 842, 685 P.2d 1193].)
(1b) We turn first to the issue of foreseeability. Although the possibility that a teenager ordered to disperse in a truck might be injured in a subsequent accident is not wholly unforeseeable, the issue of foreseeability cannot be analyzed in a vacuum. Rather, it must be analyzed in terms of the totality of the circumstances facing the police officer at the scene. Placing ourselves in Risso's shoes, we cannot say that it was any more likely that Dutton would be injured as a result of Risso's order to disperse than that she would be injured if Risso exercised the other options that Dutton now claims he should have exercised. Specifically, the possibility that Dutton would be injured in Quinn's truck was no more foreseeable than the possibility that she would be injured if Risso allowed her to wait for Shores's van in the park area late at night or if Risso allowed her to walk home alone from the park area late at night.[1] (Cf. Williams v. State of California, supra, 34 Cal.3d at p. 30 (conc. and dis. opn. of Mosk, J.) ["No matter which of the several alternatives [the police officer] selected, someone could persuasively argue that another deserved priority. This scenario lends itself to typical Monday-morning quarterbacking."].)
*1176 Several of the other factors enumerated in Thompson and Peterson (see ante, pp. 1174-1175) also counsel against imposing a duty on Risso in the instant case. The connection between Risso's dispersal order and Dutton's injury is tenuous. The accident did not occur until approximately one-half hour after Quinn's truck left the park area. Dutton passed up two opportunities to get out of the truck, which did not crash until after it had made two stops and until it had reached the opposite side of town. (See ante, p. 1174.) There is no moral blame to be attached to Risso's conduct. Rather, he came upon a group of teenagers present in the park area just before curfew and park closing and took the action that he, in good faith, believed was best. The policy of preventing future harm, the consequences to the community of imposing a duty, and the limitations imposed on police departments by their budgets all suggest that no duty should be imposed. Were we to impose a duty in this case, a police officer confronting a group of loitering teenagers would be left with only two options  leaving the teenagers alone (thereby compromising the officer's ability to protect both the teenagers and the public generally) or assuming full responsibility for their welfare (thereby compromising the officer's ability to protect the remainder of the public).
For the reasons just discussed, we conclude that, as a matter of law, Risso did not owe Dutton a duty of care. Since we have concluded that no duty existed, we have no occasion to consider whether the duty was breached.

III. DISPOSITION
The judgment is affirmed, with costs to the City and Risso.
Strankman, P.J., and Newsom, J., concurred.
A petition for a rehearing was denied July 20, 1995.
NOTES
[1]  Contrary to Dutton's assertion, it was not illegal for her to ride in the back of Quinn's truck without a seat belt. (See former Veh. Code, § 23116 [only minors under the age of 12 years must be secured and only in enumerated circumstances].)
