A 16-year-old boy has been arrested on suspicion of making threats to kill a school pupil on social media.
The threats were allegedly made towards a child at Christ the King High School in Preston at the weekend, police said.
The school said police were contacted "as a precaution" on Monday and pupils left at their regular home time.
Lancashire Police said the threat was being treated as "targeted" and there was no wider concern for public safety.
The force said safeguarding measures were put in place at the school and stop-and-search powers were authorised in the area until 17:00 GMT on Monday.
In a statement posted on its website, the school said all pupils had left the building "safely" and, contrary to reports, "at no time was the school in lockdown".