Lessons of Black Wednesday
After carefully gathering up a bag, and perhaps already wearing the ear muffs he used regularly when shooting at his local gun club, he set about cutting telephone wires, intending to cut off the school's main line of communication with the outside world. In the event, mercifully, it was a botched job, leaving a vital line open which would later be used to contact the emergency services.
Instead of making for the school's main entrance, which would have taken him straight past the janitor's office - with the risk of being spotted and immediately challenged - he appears to have headed right, round one of the many mobile classrooms on the site. He entered by a side entrance next to the toilets.
At this point he may have hesitated, deciding whether to turn left into the main hall where an assembly for 300 lower-school pupils had recently finished, or right into the school gymnasium. He decided to turn right, apparently in the knowledge of what he would find.
The circumstances leading up to and surrounding the moment when Hamilton, brandishing an automatic pistol, burst into the gym, spraying bullets at the class of 28 four and five-year-olds and killing 16, together with their teacher Gwen Mayor, will be central to the public inquiry into the tragedy due to start next Wednesday.
During the proceedings, expected to last up to two months, Lord Cullen, the Scottish judge appointed to lead the proceedings will take evidence from witnesses and hear from lawyers representing the families of Mrs Mayor and the dead children, the headteacher Ron Taylor and the local authorities responsible for education, social and community services.
He will also consider three key issues: control of the possession and use of firearms and ammunition; school security and the vetting and supervision of adults working with children.
To assist him he will receive written evidence from pro-and anti-gun lobbies and organisations with views on whether there are adequate safeguards in schools and other public buildings to protect children.
In addition, he will consider evidence on firearms prepared by the Scottish Office and Home Office, the recommendations on improving school security published earlier this month by the Government working group set up following the death of London headteacher Philip Lawrence, and a (still unpublished) background paper by the Scottish Office on adults working with children.
It seems clear that even before Hamilton opened fire that morning he had committed serious breaches of school security, raising important questions about how he got on to the premises.
There were four different paths down which an intruder could come and enter at different doors. One of the country's largest primary schools with 700 pupils, Dunblane primary has a large number of mobile classrooms, making communication within the school difficult.
In the wake of the tragedy, interim measures to improve school security have been introduced. There is now a closed-circuit television camera installed at the entrance, linked to police headquarters in Stirling.
Classrooms have been fitted with telephone points to improve internal communications and the school is experimenting with a range of security items ranging from locks to mobile phones. Visitors are now required to sign in and out of the school and to wear identification badges while they are on the premises.
Further improvements will follow once a new primary school, Newton, opens in the town in August. Some of Dunblane's 700 children will transfer to the new school, allowing some or all of the mobile classrooms to be removed and the number of entrances to be reduced.
When Hamilton, wearing his earmuffs - and possibly a balaclava mask - burst into the gym Mrs Mayor's PE class was already in full swing. Also present was Eileen Harrild, a peripatetic gym teacher. There is considerable confusion about what happened next.
What is not in doubt is that Hamilton opened fire, perhaps killing most of his victims in the initial burst of gunfire. Mrs Harrild and many of the 12 children who survived received serious gunshot wounds.
Then he went out of an emergency door and began firing towards some mobile classrooms, forcing a teacher and her pupils to take refuge under desks. The school library was also sprayed with bullets.
He then returned to the gym and continued firing. Finally, still in the gym, he turned his gun on himself.
Trying to establish Hamilton's motives, intentions and state of mind on that fateful day and in the period running up to it will inevitably play a key part in Lord Cullen's inquiry.
Evidence that his assault was meticulously - if amateurishly - planned is likely to emerge. The possibility that he had been considering an assault for some weeks and made enquiries about the school's routine, including who took assembly and when, and how many classes attended, is also likely to be discussed.
In the bag found beside his body were several more guns and a considerable quantity of unused ammunition, leading to conjecture that his intended target may have been the school assembly. One possibility is that he arrived at the school later than intended and so changed his plan.
There is also speculation that he may have initially targeted another primary school in the Stirling area, but rejected it because it was too near the police station.
Long before the tragedy took place there were doubts about Hamilton's personality and suitability to work with children. As far back as 1974 he was dismissed as a scout leader, a point which still appears to have rankled. His apparent bitterness is evident from a series of obsessive letters, including one to the chairman of education of the former local authority, Central Region, complaining that teachers at local primary schools - and naming Dunblane and Bannockburn primaries - had issued warnings against him, claiming that he was a pervert.
While there is no shortage of stories about his odd behaviour at the many boys' clubs he ran throughout the area, across several local authority boundaries, he does not appear to have done anything obviously illegal.
Even stories such as one in which he appears to have told a group of eight and nine-year-old boys at the club he ran as a volunteer at Dunblane High School to change out of shorts and into swimming trunks for gymnastics did not set alarm bells ringing.
Parents who came into contact with him described him as an odd man, "dark", but also articulate and plausible. While there were clear suspicions, leading to parents taking their sons away from his clubs, his activities were popular with many boys who often had no other organised leisure pursuits to follow.
The inquiry is likely to receive calls to recommend extending the child protection system introduced in the 1991 Children Act which requires any organisation caring for children under eight to be registered with and inspected by the local authority.
Stirling council has already taken a lead with the introduction of a new vetting system for adults who work with children up to the age of 16 using council premises. This will include a complete criminal records check, checks on relevant qualifications, an interview with experienced council staff and take-up of two references. A new centrally-controlled letting system allowing computer checks to be made on everyone applying to hire school halls, sports centres and other premises, is being implemented. Meanwhile, its director of community services, Helen Munro, has also called for a national database to be established to pick up people - such as Hamilton - who apply to run clubs and groups in more than one authority.
People began to arrive on the scene moments after Hamilton turned the gun on himself. The head, Ron Taylor, arrived, apparently drawn by the noise, but unaware of its cause - and totally unprepared for what he found.
Others, including assistant head Stuart McCombie, the janitor and, later, a member of the parent-teacher association, who had first aid training, helped tend the wounded and dying.
The scale of the emergency which followed was unprecedented. Nothing that had happened in the past - Hungerford or even Aberfan - could prepare a school, or the emergency services, for dealing with such a situation.
The size of the school and its layout added to the difficulties faced by the emergency services and the school staff.
After news of the scale of the tragedy began to leak out hundreds of parents gathered outside the school, desperate to know whether their child or children were safe. Parents whose children died reportedly had to wait for up to five hours to be told the news and there was considerable anger at the lack of information available from the police. It is likely that the inquiry will look at what lessons can be learned from the way the situation was handled.
One thing which has drawn praise from parents and school governors is the way teachers and other staff kept hundreds of children occupied in their classrooms, largely unaware of what had taken place, for several hours. As a result few children, other than those directly affected, have been traumatised.
Much of the attention at the inquiry is likely to focus on the country's gun laws with feelings in Dunblane itself strongly in favour of a complete ban on the use of handguns and tough action to limit the use of firearms. A local campaign, the Snowdrop Petition, is being backed by the Dunblane primary school board and PTA.
When Lord Cullen delivers his report later this year its recommendations are likely to have a profound influence on schools, voluntary groups, youth clubs, sports centres and others who work with or supervise children.
Meanwhile, the children and staff who survived Hamilton's murderous assault are continuing to recover from their physical and psychological injuries.
Most, but not all, of the 12 children are now back at the school, where they have been provided with extra support and counselling. Some of the children have been disabled by their injuries and some still suffer nightmares.
For these children and the 16 who died, along with their teacher Mrs Mayor, Lord Cullen's inquiry offers the chance to learn the lessons of Dunblane.