TANG, Circuit Judge:
Doggett appeals the district court’s dismissal for lack of jurisdiction of his Federal Tort Claims Act (FTCA) suit arising from an automobile accident caused by an intoxicated serviceman. The district court dismissed the action on the grounds that under California law the provider of alcoholic beverages is immune from tort liability and that no employee of the United States had the requisite “special relationship” with the intoxicated serviceman to create a duty to control his behavior. We affirm in part and reverse in part.
I. BACKGROUND
On October 6, 1983, Mark Patrick Gor-man, an active duty enlisted member of the United States Navy, with the rating of Machinist’s Mate Third Class (MN3), was stationed at the Naval Weapons Station in Seal Beach, California. At approximately 3:30 p.m., on his way home from work, Gorman stopped at the Consolidated Mess Open (CMO), also known as Bunker 33. Bunker 33 is located within the boundaries of the Seal Beach Naval Weapons Station and operates under the control of its Commanding Officer to provide food, refreshments and recreational facilities for military personnel, their dependents and guests.
MN3 Gorman consumed two bottles and eight or ten glasses of beer at Bunker 33 between 3:30 and 7:20 p.m. While drinking there, Gorman was in the company of five Navy acquaintances, including at least two superior petty officers attached to his unit. At about 7:20 p.m. Gorman left Bunker 33, entered his personal vehicle and departed the Naval Weapons Station through the main gate. Some twenty minutes later Gorman’s car crossed the center-line of the Pacific Coast Highway and struck the car in which Peter H. Doggett was a passenger. Doggett suffered severe and disabling injuries, including brain trauma, broken bones, partial paralysis, and loss of visual, verbal and mental acuity.
After an investigation by the Long Beach, California Police Department, Gor-man was charged with several violations of the California Vehicle Code, including Section 23153(a) (causing death or injury while driving under the influence of alcohol) and Section 23153(b) (causing death or injury while driving with a blood alcohol level of 0.10 or more). Gorman subsequently pleaded “no contest” and was sentenced on these charges.
Doggett brought suit in district court under the FTCA, 28 U.S.C. §§ 1346(b), 2671-2680 (1982), on a theory that various Naval members and employees of the United States were negligent in that they allowed Gorman to drive off the Naval Weapons Station in an intoxicated condition. The district court granted the Government’s motion to dismiss for lack of jurisdiction, holding that under California law the United States is immune from liability for injuries resulting from its providing alcoholic beverages to a serviceman, and that under California law there is no duty to control the conduct of another. Doggett timely appeals.
II. ANALYSIS
We review de novo an order granting a motion to dismiss for lack of subject matter jurisdiction. Gallea v. United States, 779 F.2d 1403, 1404 (9th Cir.1986). The question of United States’ liability is entirely legal and we review it de novo. Id. (citing United States v. McConney, 728 F.2d 1195, 1201 (9th Cir.) (en banc), cert. denied, 469 U.S. 824, 105 S.Ct. 101, 83 L.Ed.2d 46 (1984).
Under the FTCA, the question of liability is determined with reference to state law. 28 U.S.C. § 2674; Gallea, 779 F.2d at 1404; Louie v. United States, 776 F.2d 819, 824 (9th Cir.1985). We review de novo district court interpretations of state law, Gallea, 779 F.2d at 1404; Matter of McLinn, 739 F.2d 1395, 1397 (9th Cir.1984) (en banc).
Doggett’s complaint indicates that the liability he seeks to impose on the United States arises from the actions of one or more of three categories of Naval person[687]*687nel and civilian employees — the bartender at Bunker 33, the security guard who allowed Gorman to drive off the base, and the enlisted men and officers with whom Gorman spent the late afternoon drinking. First we consider whether these individuals were acting within the scope of their employment during the time in question. Then we turn to the more troublesome question whether state law imposes any duty on these individuals that they may have breached. We analyze in turn the theories of potential liability as they apply to each of these categories of individuals.
A. Scope of Employment
The FTCA waives the government’s immunity from suit only for personal injuries caused by an “employee of the Government while acting within the scope of his office or employment.” 28 U.S.C. § 1346(b). For members of the military, the scope of employment “means acting in line of duty,” 28 U.S.C. § 2671, and “line of duty” is defined by the state law of respondeat superior. Williams v. United States, 350 U.S. 857, 76 S.Ct. 100, 100 L.Ed. 761 (1955) (per curiam); Lutz v. United States, 685 F.2d 1178, 1182 (9th Cir.1982). California law of respondeat superior defines the scope of employment very broadly. Kimberly M. by Cobbs v. Los Angeles Unified School Dist., 196 Cal.App.3d 1506, 242 Cal.Rptr. 612, 617 (1987) (citing Alma v. Oakland Unified School Dist., 123 Cal.App.3d 133, 139, 176 Cal.Rptr. 287 (1981)); Proietti v. Civiletti, 603 F.2d 88, 90 (9th Cir.1979). An employee need not be engaged in the ultimate object of his employment at the time of the wrongful act for liability to be attributed to the employer but the employer is not vicariously liable if the employee substantially deviates from his duties for personal purposes. Kimberly M., 196 Cal.App.3d 1506, 242 Cal.Rptr. at 617. “ ‘The determination as to whether an employee committed a tort during the course of his employment turns on whether “1) the act performed was either required or ‘incident to his duties’ ..., or 2) the employee’s misconduct could be reasonably foreseen by the employer in any event.” [Citation]’ ” Jeffrey Scott E. v. Central Baptist Church, 197 Cal.App.3d 718, 243 Cal.Rptr. 128, 129 (1988) (quoting Martinez v. Hagopian, 182 Cal.App.3d 1223, 1228, 227 Cal.Rptr. 763 (1986)).
The Government argues strenuously that applying these legal standards leads to the conclusion that Gorman was not acting within the scope of his employment when his vehicle collided with that in which Dog-gett was a passenger. Doggett’s complaint focuses on the negligence of the bartender, the security guard and Gor-man’s drinking companions and Doggett maintains that the question of whether Gorman was within the scope of his employment is irrelevant. We therefore do not reach the issue of Gorman’s negligence, but we note that California law does not appear to support either Doggett’s assumption or the Government’s position. See, e.g., Childers v. Shasta Livestock Auction Yard, Inc., 190 Cal.App.3d 792, 804-05, 235 Cal.Rptr. 641, 646-47 (1987) (when recreational or social drinking after working hours on the employer’s premises is within the scope of employment for purposes of respondeat superior liability because endorsed or impliedly permitted by the employer and a customary incident of the employment relationship, and it leads to an accident at a time and location remote from the workplace, respondeat superior liability is properly applied); Rodgers v. Kemper Constr. Co., 50 Cal.App.3d 608, 124 Cal.Rptr. 143 (1975) (employer liable for injuries caused when two employees, who had consumed alcohol on the employer’s premises after work, assaulted two nonemployees at a construction site).
There is no question that the bartender at Bunker 33, a civilian employee of the United States, was acting within the scope of his employment when he served beers to Gorman during the hours from 3:30 to 7:20 p.m. Similarly, the security guard at the main gate was clearly acting within the scope of his employment when he allegedly negligently permitted Gorman to leave the base in an intoxicated condition. It is a slightly more complicated question whether Gorman’s off-duty drinking companions were acting within the [688]*688scope of their employment. The negligence Doggett alleges in this regard goes to the failure of Gorman’s companions to prevent him from driving while intoxicated.
Because Bunker 33 is operated by the Navy for the recreational use of military personnel, and because the Navy has promulgated regulations1 governing the treatment of persons under the influence of alcohol, we conclude that the petty officers who observed Gorman drinking were within the scope of their employment. We reach this conclusion by applying the reasoning of Lutz, 685 F.2d at 1183, in which this court said that a military base regulation requiring pet owners to exercise control of their pets on the base was a delegation “to the dog owner [of] partial responsibility for this base security function.” Because base security is a regular military function the obligation to control a dog was held to be within the scope of the dog owner’s employment, even though the lapse in control occurred during off-duty hours. Id. Here, the regulation governing the treatment of persons under the influence of alcohol is a comparable security regulation which delegates the responsibility for enforcement to military personnel with responsibility for security matters and to those with supervisory or command authority. The performance of this specific military duty furthers the interests of the Navy and any lapse in performance occurs in the line of duty and within the scope of employment. See id. We emphasize that the regulation governs conduct only on the military base and that it does not reach off-base conduct. Compare Hartzell v. United States, 786 F.2d 964, 969 (9th Cir.1986) (serviceperson who violated safe driving regulation while off-base was not acting within the scope of employment).
The regulation does not apply to non-supervisory, non-security personnel. It does not make anyone responsible for the conduct of others who is not already responsible. Rather, it adds an additional ground for exercising existing responsibility and prescribes the method for doing so. In light of the fact that we conclude below that the enlisted men who were drinking with Gorman were not under a state law duty to detain or control him, we do not reach the question whether they were acting within the scope of their employment.
B. Duty
We next consider whether the conduct of the bartender, the guard or Gorman’s companions constituted negligent or wrongful acts or omissions. 28 U.S.C. § 1346(b). In considering the existence of a duty in a given case, under California law, several factors must be considered, 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.” Rowland v. Christian, 69 Cal.2d [689]*689108, 113, 70 Cal.Rptr. 97, 100, 443 P.2d 561 (1968). These factors provide little guidance to a determination whether any of the actors in this case had a duty to protect California motorists by controlling Gor-man’s conduct.
The general rule in California is that one has no duty to come to the aid of another. Harris v. Smith, 157 Cal.App.3d 100, 105, 203 Cal.Rptr. 541, 543 (1984). No one must take affirmative action to assist or protect another unless a special relationship between them gives rise to such a duty. Id. (citing Stout v. City of Porterville, 148 Cal.App.3d 937, 942, 196 Cal.Rptr. 301 (1983)). We must determine whether the doctrines of dramshop liability, public entity liability for failure to follow mandatory enactments, good samaritanism, or special relationship create in the bartender or any of the military personnel a duty to restrain Gorman from driving while drunk.
1. Bartender
Under the FTCA the United States is liable in tort “in the same manner and to the same extent as a private individual under like circumstances.” 28 U.S.C. § 2674. Under California law “[n]o person who sells, furnishes, gives, or causes to be sold, furnished, or given away, any alcoholic beverage ... shall be civilly liable to any injured person ... for injuries inflicted on that person as a result of intoxication by the consumer of such alcoholic beverage.” Cal.Bus. & Prof.Code § 25602(b). The California Supreme Court has read this statute to mean that a private individual enjoys a “sweeping immunity” from liability for serving or providing alcoholic beverages. Strang v. Cabrol, 37 Cal.3d 720, 724, 209 Cal.Rptr. 347, 350, 691 P.2d 1013, 1016 (1984).
We agree with the district court that the United States could not be held liable for its employee’s providing alcohol to Gorman because a private individual in California under the dramshop law would incur no liability for such conduct.
2. Security Guard
Under the FTCA the United States may “be liable for the performance of activities private persons do not perform.” Wright v. United States, 719 F.2d 1032, 1034 (9th Cir.1983). It is difficult to analyze the United States’ liability for actions involving unique governmental functions by simply considering the potential liability of private citizens under state law. In such cases this court has sought to determine what liability state law attaches to similar activities undertaken by analogous entities subject to its jurisdiction. Gallea, 779 F.2d at 1407 (Kennedy, J., concurring). This was the method adopted in Louie v. United States, 776 F.2d 819, 825 (9th Cir.1985) in which we said that the law enforcement function of military police requires that liability be determined by analogy to state and municipal entities.
Public entities in California are liable for injuries of the kind sought to be avoided by the enactment of a mandatory duty. Cal. Gov’t Code § 815.6.2 A public entity is defined to include “the State, the Regents of the University of California, a county, city, district, public authority, public agency, and any other political subdivision or political corporation in the State.” Cal. Gov’t Code § 811.2. While the courts of California have not decided whether a police department is a public entity under section 811.2, the Ninth Circuit has concluded that a police department is a public entity. Shaw v. California Dep’t of Alcoholic Beverage Control, 788 F.2d 600, 604-[690]*69005 (9th Cir.1986) (reasoning that because the California Supreme Court has decided that a police department is a public entity within the meaning of section 200 of the California Evidence Code, Peterson v. City of Long Beach, 24 Cal.3d 238, 244, 155 Cal.Rptr. 360, 363, 594 P.2d 477, 480 (1979), it would also find a police department is a public entity under Cal.Gov’t Code § 811.2). Doggett’s complaint thus raises the question whether an agent of a municipal or state law enforcement entity would have a duty to prevent an intoxicated driver from driving on public highways.3
California courts have recognized that certain enactments create a mandatory duty upon law enforcement officers under Cal.Gov’t Code § 815.6. See Sullivan v. City of Sacramento, 190 Cal.App.3d 1070, 1080, 235 Cal.Rptr. 844, 847, 848-49 (1987) (generally explaining the rationale of section 815.6 but holding that Sullivan, who sued for negligent infliction of emotional distress when a police dispatcher verbally abused her while she was being burglarized and raped, had not sufficiently alleged violation of a specific regulation); Lehto v. City of Oxnard, 171 Cal.App.3d 285, 292-93, 217 Cal.Rptr. 450 (1985) (holding that allegations of negligence based on a failure to follow state statutory and decisional law and city enactments, regulations and customs were insufficient because no specific enactment was alleged to have been violated) 4; Green v. City of Livermore, 117 [691]*691Cal.App.3d 82, 172 Cal.Rptr. 461 (1981). In Green, officers stopped a drunk driver but neglected to follow mandatory procedures requiring that they remove the keys from the car. Id. at 90-91, 172 Cal.Rptr. at 465. One of the inebriated passengers drove off in the car and had an accident; the court determined that liability could be imposed for the subsequent injuries because of the officers’ failure to comply with a mandatory regulation. Id. Despite a retreat from the dicta in Green discussing police officers’ general duty to the public, see Harris, 157 Cal.App.3d at 107, 203 Cal.Rptr. at 545, to the extent Green relies on section 815.6 as the source of the officers’ duty, it remains the law in California. See Lehto, 217 Cal.Rptr. at 454 (“what remains of Green then is its reliance on section 815.6 to relieve a plaintiff from pleading the existence of a special relationship”).
We must now determine whether the naval base regulation relied on by Doggett meets the standard for creating a mandatory duty by an enactment within the meaning of Cal.Gov’t Code § 815.6. The regulation fully set out in footnote 1, supra, indicates that military personnel are under a mandatory duty to detain an intoxicated marine and report him to the Security Office for referral to the Station Dispensary. WPNSTASB Instruction 5510.1 Ch. 7, 7-1-1. The regulations require that “[n]o person determined to be under the influence shall be released without escort, and shall not be allowed to drive until determination of sobriety is made.” Id. § 7-l-la.(3). Doggett has alleged the violation of a specific enactment, and thus has avoided the stricture of Sullivan and Leh-to and has brought himself under the controlling principle of Green, if the military regulation is in fact an enactment within the meaning of section 815.6.5
Liability under section 815.6 is found only if three required elements are present. Posey v. State, 180 Cal.App.3d 836, 848, 225 Cal.Rptr. 830, 838 (1986). “First there must be an enactment which imposes a mandatory, not discretionary, duty. Second, the enactment must be intended to protect against the kind of risk of injury suffered by the individual asserting liability under section 815.6. Finally, the breach of the mandatory duty must be a proximate cause of the injury suffered.” Id. (citations omitted; emphasis in original).
The threshhold question is whether the regulation meets the statutory requirements of an enactment as defined in section 811.6. The regulation at issue is an enactment of the United States Navy adopted by the Seal Beach Naval Weapons Station and incorporated into the Base Security Manual pursuant to authority vested by 32 C.F.R. § 700.1150(b). The regulation thus has the force of law because it was promulgated pursuant to authorization to implement security regulations enforced or administered by the promulgator. See Posey, 180 Cal.App.3d at 849, 225 Cal.Rptr. at 838. The Seal Beach Security Regulations [692]*692are not an informal guide or recommended procedure or policy manual, see id., but rather are regulations with the force of law.
We turn to the first element required for imposing liability under section 815.6, whether there is a mandatory duty. The question of whether an enactment is intended to impose a mandatory duty is a question of interpretation for the courts and the intent is determined from a reasonable construction of the statutory language. Sullivan v. City of Sacramento, 190 Cal.App.3d 1070, 1080, 235 Cal.Rptr. 844, 849 (1987). The regulation here creates a mandatory duty because the duty to detain intoxicated service personnel is obligatory, not permissive. See Posey, 180 Cal.App.3d at 848, 225 Cal.Rptr. at 838. The regulation says that persons thought to be under the influence shall be detained, and although the word shall does not always create an obligatory rather than permissive obligation, see Stout v. City of Porterville, 148 Cal.App.3d 937, 947 n. 5, 196 Cal.Rptr. 301, 307 n. 5 (1983), we think it does in this case. Of course the obligatory duty to detain only arises when naval personnel have reason to believe someone is under the influence of alcohol because of appearance, actions or behavior. WPNSTASB Instruction 5510.1, § 7-1-1. We express no opinion as to the possibility that Doggett can prove this duty actually arose when the guard allowed Gorman to leave the base.
We also think the second element is satisfied because this regulation is intended to protect against the kind of risk of injury suffered by Doggett, who asserts liability under section 815.6. Although the regulation indicates that the “welfare and protection” of the intoxicated person is “of primary concern,” id. § 7-l-la.(3), the regulations as a whole reflect a concern that intoxicated persons not be permitted to drive vehicles on or off base, id., § 7-l-lb.(2).
We also think that if the guard had reason to know that Gorman was under the influence, his failure to follow the regulation creating a mandatory duty to detain an intoxicated service person was a proximate cause of the accident that occurred some twenty minutes later, and thus the third element set out by the Posey court is satisfied. California courts consistently note that “proximate cause is legal cause, as distinguished from the laymen’s notion of actual cause, and is always', in the first instance, a question of law.” State v. Superior Court of Sacramento County, 150 Cal.App.3d 848, 857, 197 Cal.Rptr. 914, 920 (1984) (citations omitted). Proximate cause “is that cause which, in natural and continuous sequence, unbroken by any efficient intervening cause, produced the injury ... and without which such result would not have occurred.” Id. Ultimately the determination of whether a particular negligent act is the proximate cause of a resulting injury is a question of fact for the jury. Myers v. Quesenberry, 144 Cal.App.3d 888, 895, 193 Cal.Rptr. 733, 737 (1983); 4 Witkin, Summary of California Law: Torts, § 621, at 2903 (8th ed. 1974 & Supp.1984).
When the performance of a mandatory duty would not necessarily have altered the course of events, California courts have found the breach of duty was not the proximate cause of the injury. See, e.g., Superior Court of Sacramento County, 150 Cal.App.3d at 857, 197 Cal.Rptr. at 920 (real estate commissioner’s failure to investigate complaints concerning real estate licenses not the proximate cause of licensee’s unlawful appropriation of funds because even if commissioner had investigated he would not necessarily have imposed sanctions that would have prevented plaintiff’s losses); Whitcombe v. Yolo County, 73 Cal.App.3d 698, 707-708, 141 Cal.Rptr. 189, 194-95 (1977) (County’s alleged breach of duty to present reports about a probationer to the court did not proximately cause injuries of the probationer’s assault victims because the court would not necessarily have revoked probation even if it had received the reports). However, when performance of a mandatory duty would have altered the course of events, the breach of duty may be a proximate cause of injury. See, e.g., Morris v. Marin County, 18 Cal.3d 901, 907-11, 136 Cal.Rptr. 251, 255-57, 559 P.2d 606 (1977) (county’s failure to require [693]*693employer seeking a building permit to file certificate of workmen’s compensation insurance created liability for a worker’s uncompensated injuries); Sullivan v. Los Angeles County, 12 Cal.3d 710, 117 Cal.Rptr. 241, 527 P.2d 865 (1974) (breach of mandatory duty to release prisoner when criminal action dismissed created liability for damages to unreleased prisoner). We conclude that if the guard had reason to believe Gorman was under the influence the guard had no option but to detain him and prevent him from driving until a determination of sobriety was made. WPNSTASB Instruction 5510.1, § 7-l-la.(3). Under those circumstances whether the alleged breach of a mandatory duty was a proximate cause of Doggett’s subsequent injuries is a question properly to be resolved by the jury.
In sum, we conclude that the base regulation defines the standard of conduct of the security guard because his function is analogous to that of a police officer and liability may therefore be imposed on the United States to the extent it would be on a state or municipal entity. See Louie, 776 F.2d at 825. The complaint should not have been dismissed insofar as it was predicated on the conduct of the security guard.
3. Drinking Companions
In turning to the arguments that Gorman’s drinking companions had a duty to restrain him from driving, we first observe that the base regulation just discussed is inapplicable to the analysis of their duty in this case. The mere existence of the base regulation does not in itself create a duty, it only defines the proper standard of care if a duty is determined to exist as a matter of state law. Lutz, 685 F.2d at 1184. The regulation was relevant in assessing the duty of the security guard because the guard’s function is analogous to that of a municipal police officer and an employee of a public entity is under a statutory obligation in California to comply with the enactments of that entity. Cal. Gov’t Code § 815.6. Gorman’s drinking companions are not functionally equivalent to a public entity under California law and thus the base regulation cannot be the source of any duty to control Gorman for Doggett’s protection.
Doggett advances several alternative theories to support his argument that California law imposes a duty on Gorman’s companions to control his conduct. Two of these require comment.6 First is the theory that Doggett’s companions had a duty to control his conduct because of their “special relationship” to him as fellow Naval members and, in two instances, as his superior officers.
a. Special Relationship
This court has already determined that the military relationship does not constitute a special relationship merely because of the military command’s general right to control the conduct of military personnel. Hartzell v. United States, 786 F.2d 964, 968 (9th Cir.1986)(citing Louie, 776 F.2d at 826). As the Louie court explained, plaintiffs may not create a cause of action based on a military relationship “where liability would not lie under state law.” 776 F.2d at 826.
Doggett therefore attempts to bring his contention that a special relationship exists within the ambit of Tarasoff v. Regents, 17 Cal.3d 425, 131 Cal.Rptr. 14, 551 P.2d 334 (1976), in which the California Supreme Court held that a psychiatrist stands in a special relationship to his patient and to the foreseeable victims of his patient's violent behavior which creates a duty to warn or otherwise protect the potential victims. This doctrine was applied in Myers v. Quesenberry, 144 Cal.App.3d 888, 894, 193 Cal.Rptr. 733, 736 (1983) in which the court held that a doctor might be liable in negligence for telling a woman with uncontrolled diabetes to go immediately to a hospital for tests preliminary to aborting her dead fetus, and failing to warn her not to drive in her condition. We fail to see any [694]*694similarity between the doctor-patient relationships in these cases and that between Gorman and the enlisted men or officers with whom he was drinking. These individuals did not stand with Gorman in a relationship similar to the medical or psychiatric relationship that would have given them a responsibility to warn him he had had too much to drink to drive safely.
b. Good Samaritan Doctrine