England's schools have been told they can install airport-style security scanners in tackling knife culture.
Luke Walmsley was fatally stabbed as he left a science class at school
Education Secretary Alan Johnson gave schools the go-ahead to carry out spot searches using metal detectors which can show up weapons under clothing.
He said government lawyers had confirmed that introducing such screening in schools was lawful.
The move has been welcomed by teaching unions including the Association of School and College Leaders and NASUWT.
Screening would involve pupils' walking through an arch or being checked with a metal detector wand.
Legislation within the Education and Inspections Bill, currently going through Parliament, will give teachers the right to carry out hands-on searches without pupils' prior consent.
But new guidance being issued to schools on searching for weapons clarifies that detectors which do not require physical contact with pupils can already be used at random.
New legislation is not required for these screening techniques.
Teachers and head teachers will be able to carry out hands-on checks if scanning arouses any suspicion.
Mr Johnson said he wanted to ensure schools were "knife-free zones".
"We're giving head teachers the extra powers they need to make their schools safe for all pupils and staff," he said.
"If they feel it is appropriate they can now both screen and search pupils to prevent weapons coming through the school gates."
Mr Johnson said the move would be a strong deterrent to the minority of pupils who want to bring knives and other weapons into school.
"Parents will welcome the fact that we are sending out a clear message that bringing a knife into school is a criminal offence and will not be tolerated."
The NASUWT called for the government to back random, airport-style checks two years ago.
This followed the killing in November 2003 of 14-year-old Luke Walmsley who was stabbed as he left a science class at Birkbeck School, North Somercotes, Lincolnshire.
NASUWT general-secretary Chris Keates said the government's move would be "warmly received" by the school workforce.
But its general-secretary Chris Keates warned head teachers should be able to allocate searches to either external security staff or staff who had school security as part of their role.