A 42-year-old man allegedly engaged in sex with a student at Champlin Park High School on Wednesday, Brooklyn Park police said.

Police were called to the school about noon after staffers were alerted by students about a suspicious man in the school, which is on the Brooklyn Park/Champlin border. Staffers followed him out of the school and detained him until officers arrived, according to a police news release.

Police said that the suspect had arranged a meeting with the student at the school. The student and the suspect allegedly met in a bathroom, where the sexual activity took place.

The suspect was arrested on suspicion of criminal sexual conduct and is being held in the Brooklyn Park jail.

In a statement released by the Anoka-Hennepin School District, officials said administrators are investigating.

“Our initial information indicates this was an intentional, prearranged encounter and not a random incident. After this incident, we are increasing our protocols to ensure visitors get to their approved destination,” according to the statement. “School administration will work cooperatively with Brooklyn Park Police to review and adjust additional security procedures as determined through that review.”

In a statement, Principal Michael George thanked the students and staff who reported the man’s presence and helped detain him.

“This is a perfect example of our CPHS Family taking action when they witnessed something that wasn’t right,” George said. “The actions of our students and staff helped our school today.”