
96 Cal.Rptr.2d 338 (2000)
80 Cal.App.4th 1448
In re RANDY G., a Person Coming Under the Juvenile Court Law.
The People, Plaintiff and Respondent,
v.
Randy G., a Minor, Defendant and Appellant.
No. B133952.
Court of Appeal, Second District, Division Three.
May 30, 2000.
Review Granted September 13, 2000.
*339 Michele A. Douglass, Long Beach, for Defendant and Appellant.
Bill Lockyer, Attorney General, David P. Druliner, Chief Assistant Attorney General, Carol Wendelin Pollack, Senior Assistant Attorney General, William T. Harter, Supervising Deputy Attorney General and Joana Perez Castille, Deputy Attorney General for Plaintiff and Respondent.
SCHNEIDER, J.[*]
Randy G., a minor, appeals from an order of the Juvenile Court declaring him a ward of the court by reason of his violation of Penal Code section 626.10 (possession of a locking blade knife on school grounds).[1] Following the declaration of wardship, Randy was placed home on probation. Randy timely filed his notice of appeal.
The only issue presented in this appeal is whether the knife that was seized from Randy's person was obtained in violation of his Fourth Amendment rights. Viewed in accordance with the customary rules governing appellant review (People v. Leyba (1981) 29 Cal.3d 591, 596-598, 174 Cal. Rptr. 867, 629 P.2d 961), the evidence adduced at the suppression hearing held in the Juvenile Court revealed the following:[2]

"A. Prosecution Case
"On March 16, 1999, Cathy Worthy was on duty as a Montebello High School Campus Security Officer.... During class passing time, at approximately 9:00 a.m., Worthy found appellant and a friend between a building and the auditorium, an area in which students were prohibited from congregating.... Appellant looked at Worthy and very nervously fixed the lining of his left pocket which had been protruding....
*340 "Worthy then asked the boys if they needed anything and advised them to go to class.... They left after appellant finished arranging his pocket. Concerned that minor looked `very paranoid and nervous,' Worthy decided to follow the boys....
"After following the boys to class, Worthy informed her supervisor of the situation.... Her supervisor instructed her to contact the other security officer in charge of the prohibited area.... Worthy did so and explained to him what happened. The two of them then went to appellant's classroom and requested to see him outside in the hallway. Once outside of the classroom, Worthy asked appellant if he had anything on him. He replied no. Worthy advised appellant that it would be better if he told her if he had anything before being brought to the vice principal. Appellant continued to deny having anything....
"The second security officer then requested permission to search appellant's bag.... Appellant responded, `Go ahead.' The same officer then asked permission to do a pat-down search. Appellant agreed. Worthy asked, `Are you sure it's okay with you?' Appellant answered yes. The officer then found a locking blade knife in appellant's left pocket....
"At approximately 11:20 a.m., Robert Berrera, a school Police Officer, responded to a call of a student with possession of a knife on the Montebello campus.... Officer Berrera recognized appellant from the call. Upon arriving to [sic] the school, Officer Berrera spoke to the principal and was given a yellow folding knife with a locking blade, one and one-quarter inches long....

"B. Defense Case
"After talking to the second security officer, Worthy decided to detain appellant and conduct an investigation.... After having him step out into the hallway, appellant was questioned for about ten minutes before he was asked for consent to search. No search was done until appellant gave his consent. During this time, appellant was not free to leave Worthy's presence...."
Based on the facts set forth above, Randy contends that he was detained under circumstances where there was no reasonable suspicion of criminal activity and that, accordingly, the knife seized from his person was required to be suppressed. In reviewing Randy's Fourth Amendment claim, we conducted an independent review of the trial court's legal conclusions. (People v. Leyba, supra, 29 Cal.3d at p. 597, 174 Cal.Rptr. 867, 629 P.2d 961.)
In In re William G. (1985) 40 Cal.3d 550, 221 Cal.Rptr. 118, 709 P.2d 1287 the court enunciated the standard that applies to a search of a student on school grounds by a public school official. The court stated: "we conclude that searches of students by public school officials must be based on a reasonable suspicion that the student or students to be searched have engaged, or are engaging, in a proscribed activity (that is, a violation of a school rule or regulation, or a criminal statute)." (Id. at p. 564, 221 Cal.Rptr. 118, 709 P.2d 1287.)
A similar standard was established by the United States Supreme Court in New Jersey v. T.L.O. (1985) 469 U.S. 325, 341-342, 105 S.Ct. 733, 83 L.Ed.2d 720: "Under ordinary circumstances, a search of a student by a teacher or other school official will be `justified at its inception' when there are reasonable grounds for suspecting that the search will turn up evidence that the student has violated or is violating either the law or the rules of the school." (Fns. omitted).
Neither William G. nor T.L.O. deals with the issue presented in this case, i.e., the standard applicable to the detention[3] of a student on school grounds. *341 That issue was faced squarely by the court in In re Frederick B. (1987) 192 Cal. App.3d 79, 237 Cal.Rptr. 338, in which the court delineated the applicable facts as follows:
"Jeffrey Bartley testified that he is a `[s]chool police officer' employed by the Richmond Unified School District. His duties include `keep[ing] discipline in the schools, mak[ing] sure no outsiders are on campus, breaking up fights, things of that nature.' On June 13, 1985, he was on duty at Richmond High School, where he had been working for about two and one-half months. At approximately 11:20 a.m. Bartlett was leaving a building on the north side of the campus when he observed Frederick, whom he knew to be a student, and Robert B. standing close together exchanging paper currency.
"Bartlett approached the two boys and asked them what they had exchanged. Frederick stated that he had given Robert 50 cents. Bartlett, who had `made two detainments for narcotics-related incidents on that end of the campus,' responded that he wanted the boys to accompany him to the dean's office to `check[ ] it out.' Frederick refused. Bartlett `tried to reason with him, tried to explain that if [Frederick's story was correct], then what is the difficulty in going to the office and checking it out and clearing up the matter.'
"Frederick, who was `very obviously nervous,' still refused. After several minutes of unsuccessfully trying to persuade Frederick to go to the dean's office, Bartlett used a walkie-talkie to summon another security officer. Upon hearing this, Frederick started to walk away. Bartlett 'pursued him and stood in front of him and again ... asked him to come to the office.' In Bartlett's words: `At that point he turned away from me and started walking away again. I made the decision then to physically detain him.' As Bartlett and another security officer were in the process of bodily restraining Frederick, Bartlett discovered a pistol in the front of Frederick's waistband." (In re Frederick B., supra, 192 Cal.App.3d at pp. 82-83, 237 Cal.Rptr. 338.)
After citing William G. and T.L.O. (both of which cases involve searches of students, the court stated that "[a] detention, however, is also governed according to federal law by a variant of the reasonable suspicion test, i.e., whether the detaining officer has reasonable suspicion that the person to be detained has been, is, or is about to be engaged in criminal activity. [Citations.]" (In re Frederick B., supra, 192 Cal.App.3d at pp. 84-85, 237 Cal.Rptr. 338.)
We agree with the Frederick B. court that a student may be detained whenever "the detaining officer has reasonable suspicion that the person to be detained has been, is, or is about to be engaged in criminal activity." It is our view that a student on school grounds may also be detained when the detaining officer has reasonable suspicion that the student has been, is, or is about to engage in a violation of those school rules which exist for the protection of other students attending school or for the preservation of order at the school. As the Frederick B. court observed:
"`The touchstone of ... analysis under the Fourth Amendment is always "the reasonableness in all the circumstances of the particular governmental invasion of a citizen's personal security." [Citation.] Reasonableness, of course, depends "on a balance *342 between the public interest and the individual's right to personal security free from arbitrary interference by law officers." [Citation.]' [Citations.] Within this context the countervailing factors have been identified as follows: `Against the child's interest in privacy must be set the substantial interest of teachers and administrators in maintaining discipline in the classroom and on school grounds.... [T]he preservation of order and a proper educational environment requires close supervision of schoolchildren, as well as the enforcement of rules against conduct that would be perfectly permissible if undertaken by an adult.' [Citations.] It has also been recognized that `even where there is an invasion of protected freedoms "the power of the state to control the conduct of children reaches beyond the scope of its authority over adults...."' [Citation.]
"Numerous California authorities are to the same effect. [Citations.] As we shall see in part II, post, the duty to provide a safe educational setting has received statutory sanction. Failure to ensure student safety can result in civil liability for educational authorities. [Citation.] Student safety has recently received an even more august backing. As Justice Mosk put it: `[W]e must also realize that innocent, law-abiding students have a constitutional right to protection from crime and criminals, and are entitled to safe school environment. The people of California made that clear when they adopted article I, section 28, subdivision (c), of the Constitution: it provides that "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."' [Citation.]" (In re Frederick B., supra, 192 Cal.App.3d at pp. 85-56, 237 Cal.Rptr. 338.)
We agree completely with the above quoted language. Indeed, as noted by the California Supreme Court in Hoff v. Vacaville Unified School Dist. (1998) 19 Cal.4th 925, 935, 80 Cal.Rptr.2d 811, 968 P.2d 522 "[t]he relationship between school personnel and students is analogous in many ways to the relationship between parents and their children. At common law, `[s]chool officials are said to stand in loco parentis, in the place of parents, to their students, with similar powers and responsibilities. [Citation.]'"
It remains to apply the law set forth above to the facts of this case. As noted, Randy and another student were observed by the Campus Security Officer in an area in which students were prohibited from congregating. Randy looked at the Campus Security Officer and nervously fixed the lining of his left pocket which had been protruding. We conclude Randy's violation of a school rule (being in a place where students were prohibited from congregating), together with his nervous fixing of the lining of his left pocket which had been protruding, gave rise to a reasonable suspicion on the part of the officer sufficient to justify Randy's detention for the purpose of asking questions concerning the observed conduct. When, after a consensual search, a knife was seized from Randy's person, that knife was lawfully obtained. Stated otherwise, the knife was obtained as the result of a consensual search following a lawful detention.

DISPOSITION
Based on the foregoing analysis, we conclude that the trial court correctly denied Randy's motion to suppress. The order is, therefore, affirmed.
KLEIN, P.J., and CROSKEY, J., concur.
NOTES
[*]   Assigned by the Chairperson of the Judicial Council.
[1]  The crime was declared to be a felony with a maximum confinement of three years.
[2]  The factual statements contained in the briefs filed by the parties are virtually identical. We incorporate the Statement of Facts contained in Respondent's Brief as part of our opinion.
[3]  It could be argued that when Randy was bailed out of class by Worthy and the other school security officer, he was not being detained but, rather, the contact was a "consensual encounter." "Consensual encounters result in no restraint of an individual's liberty whatsoever; hence, an officer is not required to have an objective justification to stop a citizen." (People v. Verin (1990) 220 Cal. App.3d 551, 555, 269 Cal.Rptr. 573.) "Detentions are seizures of an individual strictly limited in time, duration, scope and purpose." (Ibid.) We believe Randy was being detained when he was summoned out of class. Stated otherwise, we conclude a student in Randy's position would have reasonably believed he was not free to leave after being called out of class by the securities officers. Accordingly, we analyze this case on the basis that Randy was detained.
