Opinion
Joseph F. appeals from orders declaring him a ward of the juvenile court and placing him on probation after the court sustained a petition (Welf. & Inst. Code, § 602) alleging he committed battery on a police officer and resisted arrest (Pen. Code, §§ 243, subd. (b), 148, subd. (a)). He contends there was insufficient evidence he committed the offenses and an insufficient basis for the gang-related conditions of his probation. We affirm.
Background
On February 25, 1998, Fairfield Police Officer Robert Salas was at the Golden West Middle School in Fairfield for a meeting with the school’s assistant principal, John Fink. Salas was the police resource officer assigned to the local school district, and as such it was his responsibility to provide a safe and secure environment for the district’s schools. Salas testified that at approximately 3:00 p.m. from inside a building he noticed appellant and Raymond G. outside near some classrooms in the “quad area” of the school campus. He reported this sighting to Fink, who went outside to investigate. Salas recognized appellant as a student at a nearby high school. Through the window, Salas saw Fink encounter appellant and Raymond. Appellant appeared to ignore Fink and continued walking. Fink then motioned to Salas to come outside.
Salas went outside. Fink told him he “wanted something done” because appellant had failed to comply with Fink’s instructions. Salas testified that Fink wanted appellant detained until he (Fink) could investigate whether appellant, as a nonstudent on campus, was trespassing. Salas never heard Fink instruct appellant to leave the school grounds. Fink did not testify, and there was no evidence of the conversation between him and appellant or exactly why Fink requested Salas’s presence.
*980Salas then went to where appellant and Raymond had proceeded, an area between the administration and counseling buildings, and observed them walking toward a parking lot on campus. Salas intended to detain appellant and Raymond to determine whether they should be arrested for trespassing on the school grounds.
Salas was in uniform and displaying his badge. He identified himself as a police officer and asked appellant to stop. Appellant continued walking, and Salas gave him a verbal command to stop. Appellant responded, “Fuck you, I don’t have to listen to you. You’re a son of a bitch.”
Salas then attempted to apply an armlock to appellant to make him comply with the instruction to stop, but appellant pulled away. They struggled for several minutes. During the struggle appellant grabbed unsuccessfully for Salas’s baton and also grasped Salas’s left wrist, hyperextending it by moving it up and down and side to side. Salas broke loose, and appellant continued walking away. Salas was then able to put appellant in “wrist control” by locking appellant’s right hand behind his back and applying the right handcuff. A further struggle ensued before Salas was able to apply the left handcuff.
Classes at the middle school end at 1:40 p.m., but other activities occur until shortly after 3:00 p.m. Signs are posted throughout the school stating that visitors are to register at the school office, and high school students are briefed as to rules governing their presence on the middle school campus, which rules are not disclosed by the record. Salas did not know when he detained appellant that appellant had not registered in the middle school’s front office. After the arrest Salas learned that a campus monitor had earlier encountered appellant at the soccer field area and told him to leave the campus.
Defense
Appellant testified that when high school let out for the day, he accompanied Raymond onto the middle school campus so Raymond could pick up a house key from his (Raymond’s) brother, who was at soccer practice. Appellant was on his way home at the time. A female campus monitor told them to leave because they had no pass. As they were doing so, Fink, whom appellant did not know, approached them and asked who they were. Appellant refused to identify himself to Fink and told Fink he should talk to Raymond, because Raymond was “the one that had business on the campus.” Appellant did not stop walking when Fink approached him because Fink had not identified himself and appellant “just thought he was some guy.”
*981Appellant was then approached by Salas, who first told him to “[C]ome here. Mr. Fink wants to talk to you.” Appellant replied that he had already been instructed to leave campus, did not need to talk to “him” (presumably Fink), and was on his way home.
When his arm was first grabbed, appellant did not know and could not see who had done so. He thought it might have been Raymond, so he tried “yanking” away. He stopped when he realized it was Salas. He denied grabbing for Salas’s baton or grasping his wrist. When Salas pulled out his baton, appellant put his hand up and said “I give up, just arrest me.”
Appellant was placed on indeterminate probation. Somewhat ambiguously, he objected to its gang-related terms and conditions, which required that he not (1) be present at any known gathering area of any street gang; (2) associate with any known members or associates of any gang; (3) wear any gang-associated clothing or emblems; (4) possess any gang-related paraphernalia; (5) acquire any permanent or temporary tattoos; and (6) be present at any court proceeding to which he is not a party or witness.
Discussion
I
The Legality of the Detention and Arrest
A. Standard of Review
Appellant contends there is insufficient evidence to support findings that he battered a police officer and resisted arrest because Officer Salas was not engaged in the lawful performance of his duty when he detained appellant.
Upon a claim of insufficient evidence to support a conviction, reviewing courts “must view the evidence in a light most favorable to respondent and presume in support of the judgment the existence of every fact the trier could reasonably deduce from the evidence. [Citation.]” (People v. Mosher (1969) 1 Cal.3d 379, 395 [82 Cal.Rptr. 379, 461 P.2d 659], disapproved on another point in People v. Ray (1975) 14 Cal.3d 20, 30, 32 [120 Cal.Rptr. 377, 533 P.2d 1017].) “The test on appeal becomes whether substantial evidence supports the conclusion of the trier of fact, not whether the evidence proves guilt beyond a reasonable doubt. [Citation.]” (People v. Mosher, supra, 1 Cal.3d at p. 395; see also In re Roderick P. (1972) 7 Cal.3d 801, 809 [103 Cal.Rptr. 425, 500 P.2d 1].)
*982B. Battery on a Police Officer, Resisting Arrest
Penal Code2 section 243, subdivision (b) states, in relevant part: “When a battery is committed against the person of a peace officer . . . engaged in the performance of his or her duties . . . , and the person committing the offense knows . . . that the victim is a peace officer . . . engaged in the performance of his or her duties . . . , the battery is punishable [as a misdemeanor].” (Italics added.) Section 148, subdivision (a)(1) states, in relevant part: “Every person who willfully resists, delays, or obstructs any public officer ... in the discharge or attempt to discharge any duty of his or her office or employment . . . shall be punished [as a misdemeanant].” (Italics added.)
Before a person can be convicted of either of these offenses there must be proof beyond a reasonable doubt that the officer was acting lawfully at the time the offense against him was committed. (In re Manuel G. (1997) 16 Cal.4th 805, 815 [66 Cal.Rptr.2d 701, 941 P.2d 880]; see also People v. Gonzalez (1990) 51 Cal.3d 1179, 1214-1215 [275 Cal.Rptr. 729, 800 P.2d 1159] [prosecution must prove every element of the charged offense beyond a reasonable doubt].) “ ‘The rule flows from the premise that because an officer has no duty to take illegal action, he or she is not engaged in “duties” for purposes of an offense defined in such terms, if the officer’s conduct is unlawful. . . .’ [Citation.]” (In re Manuel G., supra, at p. 815.)
Appellant argues that Salas was not acting lawfully because the detention was not reasonable. Appellant contends that well-established rules governing police conduct in public places apply here: that an investigative stop or detention is justified if the circumstances known or apparent to the officer include specific and articulable facts which make the officer suspect (1) some activity related to crime has taken place, is occurring or is about to occur, and (2) the person to be stopped is involved in that activity. The requisite facts must be such as would cause any reasonable officer in a like position, drawing on his or her training and experience, to suspect the same criminal activity and the same involvement by the person in question. (In re Tony C. (1978) 21 Cal.3d 888, 893 [148 Cal.Rptr. 366, 582 P.2d 957].)
According to his testimony, Salas attempted to detain appellant to determine whether he was trespassing on school grounds and, if so, what Fink wanted done about it. Salas articulated that he was fulfilling his responsibility to provide a safe and secure environment for his district’s schools. The question presented is thus whether Salas’s actions were reasonable.
*983Schools occupy a special place in our state. Article I, section 28, subdivision (c), of the California Constitution provides: “All students and staff of public primary, elementary, junior high and senior high schools have the inalienable right to attend campuses which are safe, secure and peaceful.”
Consistent with this constitutional mandate, section 627, subdivision (c), states: “The Legislature finds and declares that a disproportionate share of crimes committed on school campuses are committed by persons who are neither students, school officials, or staff, and who have no lawful business on the school grounds.”3 Section 627.2 prohibits an outsider from entering or remaining on school grounds during school hours without having registered with the principal or the principal’s authorized designee. “School hours” are defined as extending from one hour before classes begin until one hour after classes end. (§ 627.1, subd. (c).) Registration requires that the visitor furnish the principal or his designee with the visitor’s name, address and occupation, proof of age, his or her purpose for entering school grounds, proof of identity, and “[o]ther information consistent with the purposes of this chapter and with other provisions of law.” (§ 627.3.) An outsider who enters the school grounds without having registered and fails or refuses to leave promptly after the principal, designee or school security officer has requested the outsider to leave is guilty of a misdemeanor. (§ 627.7, subd. (a).) Education Code section 32211 contains comparable provisions. Also, a person who reenters the school grounds within seven days after being requested to leave is guilty of a misdemeanor. (§§ 626.8, subd. (a)(2), 627.7.)
Section 626.7 provides that if an outsider enters a school campus and it reasonably appears to an officer or school employee designated to maintain order that such outsider entered the campus to commit, or is committing, an act likely to interfere with the peaceful conduct of the activities on the *984campus, then the designated officer may direct the person to leave. Failure to comply is a misdemeanor.
Section 626.8, subdivisions (a)(1), (a)(2) and (c)(3), provide that any person who enters the school grounds without lawful business thereon and whose presence or acts interfere with the peaceful conduct of school activities is guilty of a misdemeanor if that person remains on the school grounds after being asked to leave by a designated officer or if that person had twice before entered on the same school grounds without lawful business and had interfered with school activities.
California’s constitutional mandate and statutory scheme clearly demonstrate that schools are special places in terms of public access. Given the constitutional direction that students have a right to be safe and the legislative findings that outsiders commit a disproportionate number of the crimes on school grounds, access to schools is limited. Those who visit during school hours must register and declare their identity and purpose. Those who are asked to leave, whether or not required to register, must do so or else be guilty of a misdemeanor. Those who repeatedly return to cause disruption are also guilty of a misdemeanor.
Further, and important to this case, the legislative scheme designates school officials as those who monitor access to campuses. This direction requires that school officials have enough information relative to visitors so that the officials can make the judgments necessary to fulfill their responsibilities. Thus, for example, section 626.7 provides that a designated official may ask someone to leave a campus if it reasonably appears to such official that the outsider is committing or is likely to commit an act to interfere with the peaceful conduct of activities of the school. A reasonable judgment will often require that the official know the purported purpose of a visitor’s presence. Similarly, since a person who repeatedly disrupts the same campus is guilty of a misdemeanor (§ 626.8, subd. (a)(3)), the identity of an outsider often must be ascertained to determine whether this person had previously caused disruption. A designated official may also ask someone to leave who has not registered or whose registration has been revoked (§ 627.7, subd. (a)), again often requiring that the school official know who the visitor is and whether that person has registered. It is axiomatic, then, that such official must be afforded enough latitude to be able to stop someone on campus and ascertain basic information within the statutory scheme such as who the person is, why he or she is present and whether he or she has registered, if required. Without such authority, the official often would be unable to make a reasonable determination as to whether the *985outsider is likely to commit a disruption, is a repeat disrupter, or must register and has registered.4
The reasonableness of Salas’s action must be viewed in this context of restricted access to California’s school grounds.5 Given the above constitutional and statutory scheme, Salas had the right to detain appellant to investigate who he was and why he was on school grounds.
In addition, Salas testified he recognized appellant and knew that appellant was an outsider to Golden West Middle School. He also knew that Fink’s encounter with appellant was not satisfactory to Fink as Fink asked Salas to detain appellant, which request was consistent with Salas’s observation that appellant appeared to ignore Fink. While it is true that Salas did not know what had been said between Fink and appellant, such actual knowledge was not necessary as Salas knew that Fink was not satisfied with the result. The choices for Salas at this point were either to interrogate Fink, a school official known to Salas, for further information and risk appellant’s escaping or to accept Fink’s conclusion that appellant must be detained. Given this information and choice, Salas was reasonably justified in detaining appellant to see if he was trespassing.
Appellant refused to accede to Salas’s request to stop, despite Salas’s being a uniformed police officer. Instead, appellant was hostile and belligerent. It was reasonable for Salas to view this lack of cooperation on a school campus by an outsider as being an indicator of a lack of legitimate presence, thus justifying an increase in the effort to effect a detention. Thereafter, as appellant resisted Salas’s efforts to detain him, the level of force to effect the detention escalated. Given our recognition that Salas had the right to determine who appellant was and why he was on the school grounds, these escalating efforts at detention were reasonable given appellant’s resistance.
Appellant argues that the detaining officer must be able to articulate a specific statute that appellant reasonably appeared to have been violating before detaining him on school grounds. Appellant points to the cross-examination of Salas where it appears that he may have believed that *986appellant had to register under section 627.2 and that, if so, Salas would have been wrong because classes had ended more than one hour before appellant was encountered. Thus, the argument is that it would not be reasonable to think that the misdemeanor of failure to register was being committed.
We do not read the testimony of Salas to be so limited. Instead, the record establishes that Salas sought to detain appellant because appellant had refused to cooperate with Fink, that Fink asked Salas to detain appellant, and that such detention was reasonably necessary to determine whether appellant was properly on school grounds.
In so concluding, we hold that unlike the rules applicable to public places in general, school officials, including police who assist in maintaining general order on school campuses, need not articulate a specific crime which appears to be violated in order to detain an outsider for the limited purpose of determining the fundamental factors justifying an outsider’s presence on a school campus, such as who he is, why he is on campus, and whether he has registered.
It is, of course, well established that “it is the right of every person to enjoy the use of public streets, buildings, parks, and other conveniences without unwarranted interference or harassment by agents of the law. [Citations.]” (In re Tony C., supra, 21 Cal.3d at p. 893, italics added.) When this significant right is balanced against society’s general need to prevent crime, the cases have consistently required that in order to justify an investigative stop, the police officer must have specific and articulable facts causing him to suspect that activity relating to crime has taken place or is occurring or is about to occur and that the person to be detained is involved in that activity. (Terry v. Ohio (1968) 392 U.S. 1, 21 [88 S.Ct. 1868, 1879-1880, 20 L.Ed.2d 889]; In re Tony C., supra, at p. 893.)
This is not to say, however, that persons have unfettered free access to all public places. Indeed, where the nature of a public place or other circumstance so justifies, citizens regularly are subjected to intrusions not appropriate in other places. Thus, for example, visitors to an airport may constitutionally be required to pass through a metal detector. (People v. Hyde (1974) 12 Cal.3d 158 [115 Cal.Rptr. 358, 524 P.2d 830].) This intrusion is justified because airplanes have historically been the subject of criminal activity such as hijacking, and thus reasonable limitations on free access through airports to airplanes are necessary to protect passengers and flight crews and to preserve safe air commerce. (Id. p. at 166.) The intrusion of a search by metal detector does not require any articulable facts relative to the individual who is subject to it. (Id. p. at 167.)
*987Also analogous are cases holding that random roadblock detentions to spot intoxicated drivers are constitutionally permissible. In Ingersoll v. Palmer (1987) 43 Cal.3d 1321 [241 Cal.Rptr. 42, 742 P.2d 1299], the Supreme Court held that sobriety checkpoint stops are not governed by the standard set forth in In re Tony C. and thus there does not need to be a reasonable suspicion that the detained drivers have or may be involved in criminal activity. Instead, the reasonableness of the detention is determined by balancing the societal need against the invasion involved. Thus, where the societal interest being protected is great and the intrusion is minimal, then the detention is reasonable under the Fourth Amendment. (Ingersoll v. Palmer, supra, at pp. 1327-1330.)
People v. Hyde and Ingersoll v. Palmer are founded on a well-established line of federal and California authorities that recognize “administrative searches” as an exception to the general rules regarding searches and seizures in public places. Administrative searches are in furtherance of an administrative purpose (such as air travel safety) rather than simply a criminal investigation seeking to secure evidence of a crime. Administrative searches may unveil evidence of specific criminal behavior, but they also deter criminal behavior by making it harder for would-be criminals to position themselves so as to commit crimes. (People v. Hyde, supra, 12 Cal.3d at pp. 165-166, and cases cited therein.)
California’s constitutional mandate and legislative scheme relative to school safety render the schools akin to those places and situations in which the courts have recognized that “administrative searches” are permissible.6 Our Legislature has determined that it is appropriate to require visitors during school hours to register and disclose their name, address, occupation, and purpose of visit. Such registration would not be justified on a public street, but is quite reasonable given the constitutional “inalienable right [of students] to attend campuses which are safe, secure and peaceful” (Cal. Const., art. I, § 28, subd. (c)), and the legislative finding that “a disproportionate share” of crimes on campuses are committed by outsiders (§ 627, subd. (c)). Indeed, such registration both allows for the administrative control of school grounds and serves as a deterrent to those who would otherwise enter the school grounds with criminal design.
The fact that the statutory registration requirements are limited to “school hours” (§ 627.2), which is defined as one hour before and one hour after *988classes end (§ 627.1, subd. (c)), does not indicate that the need to identify visitors and their purposes is limited to that period of time. The legislative finding relative to the problems caused by outsiders is not limited to any time period, and school officials are authorized to compel outsiders who have no legitimate purpose and reasonably appear actually or likely to be disruptive to leave school grounds regardless of “school hours.” (§§ 626.7, 626.8.) Indeed, it would be irrational to conclude that the dangers posed by outsiders would significantly diminish outside of “school hours.” Certainly many crimes are more likely to be perpetrated when there are fewer rather than more people around. Thus, the “school hours” limitation on registration can only be seen as defining how long school officials should be available to register visitors and not as a legislative limitation on the dangers defined by section 627.
In concluding that the constitutional mandate for safe education and the wide scope of the legislative protections afforded on school grounds cannot “trump” the Fourth Amendment (cone. & dis. opn., post, at p. 995), the concurring and dissenting opinion fails to distinguish between permissible intrusions during “school hours” and those at other times. The registration requirements of section 627.2 apply only to “school hours” and require fairly substantial intrusion. Visitors must detour from their intended destinations on campus and provide the administration with detailed personal information including name, address, occupation, proof of age, purpose of visit and “[o]ther information consistent with the purposes of this chapter and with other provisions of law.” (§ 627.3.) Given that neither the legislative findings of section 627 nor logic supports a conclusion that the threat of criminal activity from outsiders is greater during “school hours” than at other times, the dissent’s reliance on section 627.1 is inconsistent with its rejection of the right of a school official or police officer to detain an outsider for the limited purposes described above.7
Indeed, as this case clearly demonstrates, it is illogical to tie the constitutionality of minimal intrusions on visitors to artificial time parameters. Here, had the appellant been observed approximately 20 minutes earlier, i.e., within an hour of the end of classes and thus within “school hours,” then he would have had to register and, presumably under the dissent’s view, he could have properly been detained to determine if he had done so. Given that there is no legislative finding, factual matter in the record, or other basis to *989justify such divergent results, we do not accept the dissent’s reliance upon a distinction that is based upon “school hours.”
Accordingly, we conclude that school officials, or their designees, responsible for the security and safety of campuses should reasonably be permitted to detain an outsider for the limited purpose of determining such person’s identity and purpose regardless of “school hours.”
The issue presented is whether Salas was acting lawfully in the performance of his duties when he attempted to detain appellant. Because we find that Salas could properly detain appellant to determine whether he was permissibly present on campus, there was sufficient evidence to conclude that Salas was acting lawfully in the performance of his duties, an element of the offenses of battery on and resisting a police officer. Thus, there was sufficient evidence to support the juvenile court’s finding that appellant violated section 243, subdivision (b), or section 148, subdivision (a).
C. Simple Battery
Appellant contends there is insufficient evidence of a battery because he was justified in resisting Salas’s excessive use of force. He argues that Salas exerted excessive force by attempting to grab him, when he refused Salas’s commands to stop, and by applying a wristlock. Therefore, he argues, his ensuing struggle was only such force as was reasonable to defend himself.
Even if a detention were unlawful, a person may not use force or violence to resist it unless the police officer effectuated the unlawful detention by excessive, i.e., unreasonable, force. {People v. Curtis (1969) 70 Cal.2d 347, 357 [74 Cal.Rptr. 713, 450 P.2d 33], disapproved on another point in People v. Gonzalez, supra, 51 Cal.3d at p. 1222; People v. White (1980) 101 Cal.App.3d 161, 166 [161 Cal.Rptr. 541].) The reasonableness of a particular use of force is judged from the perspective of a reasonable officer on the scene, not by the 20/20 vision of hindsight. The inquiry is an objective one: Was the officer’s action objectively reasonable in light of the facts and circumstances confronting him, without regard to his underlying intent or motivation? {Martinez v. County of Los Angeles (1996) 47 Cal.App.4th 334, 343 [54 Cal.Rptr.2d 772].) It is a pure question of fact whether a police officer used reasonable force in detaining a defendant, so reviewing courts determine if there is sufficient evidence in the record for a reasonable trier of fact to conclude that the force used in effectuating a detention was reasonable. {People v. Delahoussaye (1989) 213 Cal.App.3d 1, 8 [261 Cal.Rptr. 287].)
*990Here, Salas attempted to grab appellant and apply a wristlock only after Fink sought his aid and appellant refused his requests to stop. His attempted restraint did not involve a weapon or infliction of bodily harm. (See In re Ramon T. (1997) 57 Cal.App.4th 201, 206 [66 Cal.Rptr.2d 816] [no excessive force when officer puts arm around defendant’s chest but causes no distress or facial discoloration].) Although appellant moved to dismiss the charges against him on the ground Salas lacked objectively reasonable grounds to detain him, he neither moved nor argued that Salas applied excessive force in effectuating the detention.
The circumstances of the detention provide sufficient evidence to support the juvenile court’s implied finding that Salas did not use excessive force. Thus, there was sufficient evidence presented to the trial court to sustain a finding that appellant committed a simple battery (§ 243, subd. (a)), thereby justifying his probation.
II*
The Probation Condition
Disposition
The orders appealed from are affirmed.
Stevens, J., concurred.