
4 Cal.Rptr.3d 695 (2003)
111 Cal.App.4th 1464
In re WILLIAM V., a Person Coming Under the Juvenile Court Law.
The People, Plaintiff and Respondent,
v.
William V., Defendant and Appellant.
No. A099390.
Court of Appeal, First District, Division Three.
September 17, 2003.
Review Denied December 23, 2003.
Certiorari Denied May 17, 2004.
*696 Kimberly B. Fitzgerald, under appointment by the Court of Appeal, Counsel for defendant and appellant.
Bill Lockyer, Attorney General, Robert R. Anderson, Chief Assistant Attorney General, Gerald A. Engler, Senior Assistant Attorney General, Rene A. Chacon, Supervising Deputy Attorney General, Ryan B. McCarroll, Deputy Attorney General, Counsel for plaintiff and respondent.
Certified For Partial Publication.[*]
Certiorari Denied May 17, 2004. See 124 S.Ct. 2182.
POLLAK, J.
William V. appeals from a judgment of the juvenile court making him a ward of the court for unlawfully possessing a knife on school grounds. He asserts that the court should have suppressed the knife because it was seized in an unlawful search. William argues that the specially assigned police officer who conducted the search was not a school official and thus was required to have probable cause, rather than merely a reasonable suspicion, to conduct the search. In the published portion of the opinion, we hold that the police officer, who was on a two-year assignment as a resource officer at William's school, was a school official for purposes of the Fourth Amendment, and that his search was justified by the reasonable suspicion that William was engaging in conduct that violated school rules.
William also challenges the gang-related conditions of his probation. In the unpublished portion of the opinion, we conclude the probation conditions are valid. Accordingly, we affirm.

FACTUAL AND PROCEDURAL BACKGROUND
Around 9:15 a.m. on September 6, 2001, Officer David Johannes of the Hayward Police Department entered the Hayward High School campus in full uniform. At that time, Johannes was employed as a police officer by the City of Hayward, but was assigned to Hayward High School as a "school resource officer" for a two-year term. As part of his assignment, Johannes maintained an office at the school and *697 was on the school campus approximately eight hours a day. His job duties required him to work with the administration, teachers and students. "We'll resource there for them. And also enforce laws. We also bring concerns about school policy to the administration's attention."
As Officer Johannes walked towards the administration building, he observed William standing alone in the hallway. Johannes noticed that William had a neatly folded red bandanna hanging from the back pocket of his pants. Possession of a bandanna on campus is a violation of school rules because colored bandannas commonly indicate gang affiliation. Once the officer made eye contact with William, William's behavior changed. He became nervous and started pacing. Johannes approached William and asked him to remove the bandanna. William replied, "What rag? What red rag?" The officer pointed to the bandanna and William responded that he did not know it was there. The officer removed the bandanna and decided to take William to the principal's office for discipline.
Before doing so, the officer conducted a patsearch for weapons. Johannes explained that the school had recently experienced gang activity, and that the color of the bandanna suggested that it was gang related. In Johannes's experience, the manner in which the bandanna was folded and hanging from the pocket indicated that something was about to happen or that William was getting ready for a confrontation. He explained that he also conducted the search because William was "trembling quite heavily, his entire body, especially his hands, his lips, his jaw as he was talking" and Johannes was concerned for the safety of the campus. During the patsearch of William's outer clothing, the officer detected bulk around William's waistband, but could not determine what was causing it. William was wearing baggy clothes and a windbreaker jacket that covered his waistband, so the officer lifted William's jacket and observed a handle protruding from William's front pocket. The officer removed what looked like a steak knife with a five-inch serrated metal blade. William admitted that he had the knife for protection. Johannes escorted William to the school administration office.
On November 5, 2001, the Alameda County District Attorney filed a petition pursuant to Welfare and Institutions Code section 602. The petition alleged one count of felony possession of a knife on school grounds (Pen.Code, § 626.10, subd. (a)).[1] Following a subsequent hearing, the juvenile court denied William's motion to suppress the knife. Shortly thereafter, William entered an admission to misdemeanor possession of a knife on school grounds.[2] The juvenile court adjudged William a ward of the court, and ordered him to reside with his parents while on probation and imposed various terms and conditions of the probation. William filed a timely notice of appeal.

DISCUSSION

I. The trial court properly denied William's motion to suppress.

The trial court denied William's motion to suppress, finding that when conducting a search of a student on a school campus, Johannes had the same authority as a school official, and that his belief that gang activity was about to occur was reasonable, and justified both the detention and the *698 search. William contends that Johannes was not a school official and that, even if he was, the search was still unreasonable.
"On appeal from the denial of a suppression motion, the court reviews the evidence in a light favorable to the trial courts ruling. [Citation.] We must uphold those express or implied findings of fact by the trial court which are supported by substantial evidence and independently determine whether the facts support the courts legal conclusions." (In re Joseph G. (1995) 32 Cal.App.4th 1735, 1738-1739, 38 Cal.Rptr.2d 902.)

A. The reasonable suspicion standard applicable to school officials applied to Officer Johannes as a school resource officer.

In New Jersey v. T.L.O. (1985) 469 U.S. 325, 105 S.Ct. 733, 83 L.Ed.2d 720 (T.L.O.), the United States Supreme Court addressed the constitutionality of searches of students by teachers and school officials. The court initially determined that the Fourth Amendment to the United States Constitution applies to searches of students conducted by public school officials. (T.L.O., supra, at pp. 333-336., 105 S.Ct. 733) The court recognized that, under the Fourth and Fourteenth Amendments, students have legitimate expectations of privacy in the belongings they bring to school. "In short, schoolchildren may find it necessary to carry with them a variety of legitimate, noncontraband items, and there is no reason to conclude that they have necessarily waived all rights to privacy in such items merely by bringing them onto school grounds." (T.L.O., supra, at p. 339, 105 S.Ct. 733.) The court also emphasized, however, that the state has a substantial interest in maintaining a proper educational environment for the schoolchildren entrusted to its care. "Even in schools that have been spared the most severe disciplinary problems, the 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." (Ibid.) In balancing the competing interests of a school's need to maintain a proper educational environment and the student's legitimate expectations of privacy, the court held that teachers and school officials need not obtain a warrant or have probable cause to search a student. "Rather, the legality of a search of a student should depend simply on the reasonableness, under all the circumstances, of the search." (Id. at p. 341.) The court set forth a twofold inquiry for determining the reasonableness of a student search. The action must be "justified at its inception" and the search, as actually conducted, must be "`reasonably related in scope to the circumstances which justified the interference in the first place.'" (Ibid.) "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. Such a search will be permissible in its scope when the measures adopted are reasonably related to the objectives of the search and not excessively intrusive in light of the age and sex of the student and the nature of the infraction." (Ibid., fn. omitted.)
The California Supreme Court has adopted the T.L.O. standard for violations of the California Constitution. (In re William G. (1985) 40 Cal.3d 550, 564, 221 Cal.Rptr. 118, 709 P.2d 1287.) Both the United States and California Supreme Courts, however, expressly declined to consider whether this standard is applicable *699 to searches "conducted by school officials in conjunction with or at the behest of law enforcement agencies." (T.L.O., supra, 469 U.S. at p. 341, 105 S.Ct. 733, fn. 7; In re William G., supra, 40 Cal.3d at p. 562, 221 Cal.Rptr. 118, 709 P.2d 1287, fn. 12 ["Under the facts of this case, we do not reach the issue of what standard should apply where law enforcement officials are involved at the outset of a student search, or where a school official acts in cooperation with, or as an agent of, law enforcement"].)
Recently, in In re Randy G. (2001) 26 Cal.4th 556, 110 Cal.Rptr.2d 516, 28 P.3d 239, the California Supreme Court again declined to consider the appropriate "standard for assessing the lawfulness of seizures conducted by school officials in conjunction with or at the behest of law enforcement agencies," but did hold that for purposes of assessing the validity of a detention under the Fourth Amendment, no meaningful distinction can be drawn between non-law-enforcement security officers employed by a school district and other school officials. (Id. at pp. 568-569 & fn. 3, 110 Cal.Rptr.2d 516, 28 P.3d 239.) The court reasoned, "The same observation and investigation here could well have been undertaken by a teacher, coach, or even the school principal or vice-principal. If we were to draw the distinction urged by the minor, the extent of a student's rights would depend not on the nature of the asserted infringement but on the happenstance of the status of the employee who observed and investigated the misconduct. Of equal importance, were we to hold that school security officers have less authority to enforce school regulations and investigate misconduct than other school personnel, there would be no reason for a school to employ them or delegate to them duties relating to school safety. Schools would be forced instead to assign certificated or classified personnel to yard and hall monitoring duties, an expenditure of resources schools can ill afford. The title `security officer' is not constitutionally significant." (Ibid.)
In an almost identical case, the Illinois Supreme Court held that a police officer assigned to a school as a resource officer was a school official for the purpose of assessing the legality of a search on school grounds. (People v. Dilworth (1996) 169 Ill.2d 195, 214 Ill.Dec. 456, 661 N.E.2d 310.) The police officer was assigned to the school by the city's police department, and as a school resource officer he maintained an office on school grounds. His primary purpose on the school campus was to prevent criminal activity, and if he discovered such activity he had authority either to arrest the student or to assign the student to detention. (Id. at pp. 312-314.) The court reasoned that because of the unique nature of a public school environment and the strong state interest in protecting its students, even if the officer initiates the detention based on his own observations of the student's behavior, the legality of the search should be reviewed under the same standards applicable to other school officials. In so holding, the Illinois court explicitly rejected the argument that a distinction should be drawn between police officers employed by the city and security officers hired by the school district. (Id. at p. 320.) The relationship between a student and the "school police" is no different than that between a student and a school resource officer merely because one is employed by the district and the other by the city. (Ibid.)
We too see no reason to distinguish for this purpose between a non-law-enforcement security officer and a police officer on assignment to a school as a resource officer. We reject William's argument that we should differentiate between *700 the two because the first is employed by the school district and the other by the city. This distinction focuses on the insignificant factor of who pays the officer's salary, rather than on the officer's function at the school and the special nature of a public school. As explained in In re William G., supra, 40 Cal.3d at page 563, 221 Cal.Rptr. 118, 709 P.2d 1287, "`When society requires large groups of students, too young to be considered capable of mature restraint in their use of illegal substances or dangerous instrumentalities [to congregate in the public schools], it assumes a duty to protect them from dangers posed by anti-social activities  their own and those of other students  and
 to provide them with an environment in which education is possible. To fulfill that duty, teachers and school administrators must have broad supervisory and disciplinary powers.'" The fulfillment of the school's duty should not be dependent on whether the school district or the city employs the security officer. As noted in In re Randy G., supra, 26 Cal.4th at pages 568-569, 110 Cal.Rptr.2d 516, 28 P.3d 239, drawing such a distinction might force school districts to employ private security guards rather than certified police officers, who may have superior training, which would hardly enhance protection of the students' Fourth Amendment rights.
Nor is the police officer's specialized training in Fourth Amendment search and seizure law a sufficient reason to hold the police officer to a higher standard, as William argues. William relies on the following language in the T.L.O. decision: "This standard will, we trust, neither unduly burden the efforts of school authorities to maintain order in their schools nor authorize unrestrained intrusions upon the privacy of schoolchildren. By focusing attention on the question of reasonableness, the standard will spare teachers and school administrators the necessity of schooling themselves in the niceties of probable cause and permit them to regulate their conduct according to the dictates of reason and common sense." (T.L.O., supra, 469 U.S. at pp. 342-343, 105 S.Ct. 733.) While the advantage of utilizing a standard that does not require special training in Fourth Amendment jurisprudence may not apply in the case of a police officer who has received such training, the court's decision does not rest primarily on this rationale. Rather, in balancing the importance of maintaining an appropriate educational environment with the privacy interests of students, the court felt it appropriate to permit students to be more readily subjected to a reasonable search. In so holding, the Supreme Court "joined the majority of courts that have examined this issue ... in concluding that the accommodation of the privacy interests of schoolchildren with the substantial need of teachers and administrators for freedom to maintain order in the schools does not require strict adherence to the requirement that searches be based on probable cause to believe that the subject of the search has violated or is violating the law." (T.L.O., at p. 341, 105 S.Ct. 733, fn. omitted.) That some officials enforcing the school rules may have a greater or lesser degree of training in constitutional law thus is not determinative of the standard to be applied.

B. The initial detention and subsequent search were reasonable.

Officer Johannes testified that he saw the colored bandanna hanging from William's pocket as he approached. William's violation of the school rule prohibiting bandannas on school grounds justified the initial detention. Johannes's additional testimony that the school had experienced a number of incidents of gang violence in the prior weeks, that the color of the bandanna indicated a gang affiliation, and that the manner in which the bandanna was *701 folded indicated to him that a confrontation was imminent justified the limited search for weapons. In light of William's bulky clothes, Johannes reasonably lifted William's jacket to search his waistband. Accordingly, the scope of the search was "reasonably related to the objectives of the search and not excessively intrusive in light of the age and sex of the student and the nature of the infraction." (T.L.O., supra, 469 U.S. at p. 342, 105 S.Ct. 733.)

II. The probation conditions are valid.[**]

DISPOSITION
The clerk of the Alameda County Superior Court shall modify the minute order entered on April 29, 2002, to reflect imposition of the special and standard gang conditions, rather than the standard drug conditions, of probation. In all other respects, the judgment is affirmed.
We concur: McGUINESS, P.J., and PARRILLI, J.
NOTES
[*]   Pursuant to California Rules of Court, rules 976(b) and 976.1, this opinion is certified for publication with the exception of part II of the DISCUSSION.
[1]  All further statutory references are to the Penal Code.
[2]  Possession of a knife on school property pursuant to section 626.10, subdivision (a), is a "wobbler" offense.
[**]   Part II of this opinion is not certified for publication. (See fn. *, ante.)
