Police attended Joseph Rowntree School, York, after a parent reported a pupil for making threats on social media.
The police attended the school after receiving a call at about 7 am this morning (Wednesday) following a phone call from a concerned parent about a pupil who had made threats on social media.
Police have not released the nature of the threat.
No-one has been injured.
In an update, police confirmed that they had left the school at about 11.30am and the school return to normal daily business.
A police spokesperson said: "To reassure parents following a number of rumours on social media, there was no-one with a gun or any other weapon and no-one has been injured.
"At around 9.30am today (13 March 2019) the police took a teenage boy into custody after they received information that threats had been on social media.
We realise the sight of police officers at the school caused concern. However, we hope parents are reassured that we take all such allegations seriously and worked with the school to minimise disruption and ensure the safety of all pupils."
North Yorkshire Police said that there will be a full investigation into the allegations to determine who was responsible.
They have asked people not to speculate on social media and allow the investigation to take its course.