LONDON (CNN) -- The deaths of 16 children aged five and six together with their teacher in the Scottish town of Dunblane in 1996 was one of Britain's worst incidents of gun-related violence. The massacre stunned the country, but what did the UK do to try to prevent such a tragedy happening again?
Shortly after 9 a.m. on March 13, 1996, Thomas Hamilton, a 43-year-old former Scout leader, burst into the gymnasium of a primary school in the tranquil Scottish town of Dunblane.
Within minutes 15 children aged five and six had died in a hail of bullets. One died later in hospital. Their teacher, Gwen Mayor, a 44-year-old mother of two, died in the attack, reportedly while trying to shield her pupils. Two other teachers were also seriously injured while heroically trying to protect children. Hamilton turned one of his four handguns on himself and was found dead at the scene.
Tennis star Andy Murray, who grew up in Dunblane, was present during the attack at his school, but normally refuses to speak about his experience. He posted this tribute at the weekend on his website: "My heart goes out to all those poor children, their families and the community in Newtown in Connecticut, so so sad."
In his autobiography "Hitting Back," Murray recalled how as an eight-year-old boy he was walking to the gymnasium when shooting broke out. A teacher led him and his classmates into the headteacher's study where they took refuge.
"Some of my friends' brothers and sisters were killed. I have only retained patch impressions of that day, such as being in a classroom singing songs. The weirdest thing was that we knew the guy [Hamilton]. He had been in my mum's car. It's obviously weird to think you had a murderer in your car, sitting next to your mum."
Many local people said Hamilton was an oddball -- a loner obsessed with guns and young boys, someone who didn't fit into society. He was reported to have held a grudge against the Scouting movement and his local community after police questioned him about inappropriate behavior to boys in his care. Raymond Reid, secretary of a local shooting club that rejected Hamilton for membership, described him as "sleazy."
"He was just one of these people that you got a gut feeling about ... didn't like -- or at least I didn't particularly like him," Reid said. Nevertheless, Hamilton held a permit to own handguns, possibly including the ones he used at Dunblane.
The massacre, one of the worst incidents of gun violence in mainland Britain, had a massive impact in Scotland, the rest of the UK and around the world. "This is a slaughter of the innocents, unlike anything we have ever seen in Scotland, and I think Scotland is going to have to come to terms with it," said Scottish MP Helen Liddell at the time.
After the massacre, appalled residents of Dunblane and bereaved relatives demanded to know how a person like Hamilton could be allowed to own guns. A highly successful public campaign in the months after Dunblane against gun ownership culminated in a petition being handed to the government with almost 750,000 signatures, according to British media reports.
In response, then Conservative Prime Minister John Major set up a public inquiry to look into gun laws and assess ways to better protect the public.
In the wake of the 1987 Hungerford massacre, in which one lone gunman killed 16 people, Britain introduced new legislation -- the Firearms (Amendment) Act 1988 --- making registration mandatory for owning shotguns and banning semi-automatic and pump-action weapons.
Within a year and a half of the Dunblane massacre, UK lawmakers had passed a ban on the private ownership of all handguns in mainland Britain, giving the country some of the toughest anti-gun legislation in the world. After both shootings there were firearm amnesties across the UK, resulting in the surrender of thousands of firearms and rounds of ammunition.
Britain has never had a "gun culture" like that of the United States, but there were about 200,000 legally-registered handguns in Britain before the ban, most owned by sports shooters. All small-bore pistols, including the .22 caliber, were included in the ban, along with rifles used by target shooters. Penalties for anyone found in possession of illegal firearms range from heavy fines to prison terms of up to 10 years.
"It was one of the most shocking things that has ever happened in this country and it united the country in a feeling that we had to do something," Gill Marshall Andrews, of the Gun Control Network, told CNN. "And I don't think that it would have been possible to make the kind of progress that we have made without that tragedy."
The public generally supported the ban, with most saying they saw no need for guns. However, others complained bitterly that the ban deprived legitimate sports shooters of their hobby and demonized them.
"Just because we enjoy shooting doesn't mean that we think everybody should be free to go into any shop on any street corner and buy a gun without having some suitable checks," firearms expert Michael Yardley, spokesman for Britain's Sportsmans' Society, said at the time. "There is obviously a balanced position. What we don't like is being scapegoated.
"Anyone who has any expert knowledge in this field realizes that a simplistic ban, bureaucratic ban on one category of firearm was never going to solve a real world problem," Yardley said. "But that's what's happened, and what we're going to see is handgun crime will continue as ever. It will probably grow."
According to bare statistics, the ban initially appeared to have little impact as the number of crimes involving guns in England and Wales rose heavily during the late 1990s to peak at 24,094 offenses in 2003/04.
Since then the number has fallen in each year. In 2010/11 there were 11,227 offenses, 53% below the peak number, according to the official crime figures. Crimes involving handguns also fell 44% -- from 5,549 in 2002/03 to 3,105 -- in 2010/11.
Despite this, the effectiveness of Britain's gun laws has been repeatedly questioned. The most high-profile mass shooting happened in 2010 when a lone gunman killed 12 people in a four-hour shooting spree in rural Cumbria, northern England. After a huge manhunt, the body of 52-year-old taxi driver Derrick Byrd was found alongside two powerful rifles, one equipped with a telescopic sight.
Criminologist Peter Squires said the real picture shows a slight but significant decline in the use of firearms since Dunblane. The figures don't tell the whole story, he said, but "the murder rate has fallen and all the indicators are moving in the right direction."
Squires, professor of criminology at Brighton University and a member of the Gun Control Network, said he believed the fall in crimes where guns were used was due to new legislation coupled with better policing against gangs.
"Any weapon can be misused in a crime. Gun control will never be a complete solution to events like the mass shooting we saw in Connecticut. The swamp of gun use has not been fully drained and while tighter gun control removes risk on an incremental basis, significant numbers of weapons remain in Britain."
He added it was important to note that a big problem remained in Britain and other countries with imitation guns, converted weapons such as starting pistols and air guns, "which many people regard as only one step up from a toy."