Two police officers were injured on Thursday when Freedom Park Secondary School pupils in Eldorado Park, Johannesburg threw rocks at them during a search operation. The officers were conducting the search as part of a school-based crime prevention programme when the pupils attacked them.The extent of their injuries was not immediately clear. During the operation, three pupils, aged 15, were detained for public violence and a 20-year-old pupil was arrested for possession of dagga and a dangerous weapon (knife), police spokesperson Colonel Brenda Muridili said.Muridili added that it was alleged that shots were fired from the direction of the pupils but that no one was hit. A police vehicle was damaged when stones were thrown at the police officers.National Police Commissioner Khehla Sitole condemned the attack on the officers.Sitole warned against such acts, saying it amounted to a total disregard for the law and equated to an attack on the authority of the state.Sitole wished the injured officers a speedy recovery."The police will continue to enforce the prevention and early intervention to support schools in consistently delivering teaching and learning in an environment that is physically and socially safe. That is in line with the country's vision 2030 to ensure that people in South Africa are and feel safe. The attack on police and state property should be condemned by all sectors of society," said Sitole.ALSO READ: Eldorado Park learners arrested for allegedly selling live ammunition at schoolMuridili said the three pupils detained for public violence would be released in the care of their parents until their court appearances.The pupil who was arrested for possession of dagga and a dangerous weapon will remain in custody until his court appearance.Gauteng MEC for Education Panyaza Lesufi also condemned the attack on the police. The department said it was encouraging that some of the learners that were involved had been arrested and will face the full might of the law."We urge learners to abide by the code of conduct at all times and refrain from acts of misconduct. We also appeal to parents to assist the department to enforce discipline in and outside of the school environment," Lesufi said.Lesufi will be interacting with the representative council of learners (RCLs) at all Gauteng schools and address all issues affecting learners, including violence and learner behaviour on Saturday, education department spokesperson Steve Mabona said.