It is impossible to legislate for the unimaginable. To anticipate that a man would break into a happy community school, find his way to a crowded gymnasium full of five and six-year-olds and shower them with lethal bullets is unimaginable.
The fact that it happened on Wednesday in the Scottish town of Dunblane, rendering a whole community inconsolable, has brought school security again to the fore. But most commentators agree this sort of crime is the most difficult to prevent without turning schools into high-tech fortresses.
While everyone concerned with the killings of a teacher and at least 16 children by 43-year-old Thomas Hamilton reeled in horror and disbelief, Fred Forrester, deputy general secretary of the Educational Institute of Scotland, warned against knee-jerk reactions. "It is inconceivable how such an incident could be prevented," he said.
The last time a fatal shooting occurred in a Scottish school was in 1967 when a man burst into St John's High in Dundee and shot a woman teacher. But the scale of the shooting has only been matched in recent times by the massacre of 16 people in Hungerford by Michael Ryan, in 1987, who also turned his gun on himself.
Union leaders called for a review of security in schools. Ronnie Smith of the EIS said: "It is impossible to turn schools into fortresses as they are supposed to have strong links with the community, where parents are welcomed. But we obviously have to think carefully about measures that can be taken. "
Peter Smith, general secretary of the Association of Teachers and Lecturers, called for a review of penalties for carrying unauthorised firearms and a clamp-down on unauthorised entry to school grounds.
Robin Squire, the schools minister, is due to publish a report on security early next month. The report was commissioned following the death of Philip Lawrence, the London headteacher stabbed outside his school in December trying to defend one of his pupils.
It will include recommendations on installing closed-circuit television, training for staff and limiting the number of entrances to schools.
Last week the Working Group on School Security, which includes representatives from unions, governors, police, the Home Office and Department for Education and Employment met to consider new legislation which will make carrying knives in schools illegal and to give police new powers to enter school premises.
Two years ago a man gained entry to Hall Garth, Middlesbrough, and stabbed 12-year-old Nicola Conroy to death and injured two other girls. The school community is still recovering from the incident.
Managing Security in Schools and Colleges, the Secondary Heads Association's recently published booklet, says closed-circuit television can be useful for catching and preventing intruders provided it is constantly monitored. "The operator can raise an early warning, and the opportunity to identify suspects is increased."
However the lay-out of Dunblane primary does not make such a system appropriate even if the school could afford it. A former secondary modern, the school is spread out over the site with a number of mobile classrooms.
Ian Collie, former director of education for Central region, who knows Dunblane primary well, said: "It would be very difficult to install an effective security system at the school."
Governing bodies are responsible for the security of their school. However local authorities do give advice. For example, Devon Council offers a free advisory service on all aspects of school security.
Some schools in the county use closed-circuit television, others issue personal alarms. Some local education authorities have fitted panic buttons under headteachers' and secretaries' desks. There is also support for the idea of schools only having one entrance per site.
Ken Turner, Devon's chairman of education, arts and libraries, said: "It is clear, however, that no matter how vigilant you are there is little chance of preventing a determined and deranged intruder."