Police marksmen were sent to Newtown High School in Powys on Friday and the school was told to lock its doors after becoming aware of the Facebook posts.
Three men, aged 20, 21 and 27, have since been arrested on suspicion of malicious communications and public order offences.
Police said that there was nobody at the school carrying a firearm, despite reports.
A spokesman for Dyfed-Powys Police said: "We were made aware this morning of utterly irresponsible and scaremongering posts on Facebook, suggesting that the authors of the posts were going to use firearms at a school in the Newtown area.
"The posts were by individuals local to Newtown, and police acted swiftly to address this, which resulted in the arrest of three local men, aged 20, 21 and 27 on suspicion of malicious communications and public order. As part of the initial response schools were also given advice to be vigilant.
"Understandably the posts caused serious concern in the area, and unfortunately the subsequent rumours led to misunderstandings. This is turn led to calls to the police alleging there was a man with a firearm seen outside Newtown High School.
"Police had to respond appropriately to these calls based on the threat allegedly posed, and a firearms unit was sent to the school. We can confirm that there was no man at the school, and when we have delved further into the detail of the calls, it has transpired that they were as a result of the rumours circulating, and not based on first-hand accounts.
"Police have also carried out thorough searches as a result of the arrests, and no weapons have been recovered. The local Neighbourhood Policing Team will also be present at the school at home time to reassure and inform parents, pupils and staff.
"We hope this clarification will reassure the community of Newtown that there is no threat to schools in the area, and the matter was dealt with seriously and swiftly. We would also appeal to everyone to stop sharing the posts and any associated rumours, in order to prevent any further unsubstantiated fear and alarm in the area."
The school said in a statement: "We received information today from the police asking all schools in Newtown to be vigilant. On that basis we have decided that all pupils would remain indoors today during break and lunch time.
"At the end of lunch time the school was placed into full lockdown at the request of the police. The police have confirmed that we no longer need to be in lockdown.
"Pupils will be attending last lesson as normal and will be able to leave at the end of the school day as usual."
A spokesman for Powys County Council said: “Earlier today, schools in Newtown were asked to remain vigilant by Dyfed Powys Police following information that they received.
“At the end of lunchtime, Newtown High School was put into full lockdown at the request of Dyfed Powys Police. This lockdown has now been lifted.
“Pupils will be attended last lesson as normal and were able to leave at the end of the school day as usual.”