After a gunman killed schoolchildren and a teacher in Scotland in 1996, the UK banned handguns; no school shootings have taken place there since.
Among the social media content commonly re-shared after the February 2018 Parkland school shooting in Florida was a meme about the 1996 Dunblane primary school massacre in Scotland, and the lack of school shootings after implementation of a handgun ban:
The basic facts related in the meme — that the tragedy was soon followed by the passage of restrictive handgun laws, and that no school shootings have occurred in the UK since — are true.
On 13 March 1996, sixteen children and a teacher were murdered during what is now known as the Dunblane Massacre in which Thomas Hamilton, armed with handguns (which were legal there at that time), entered the Dunblane Primary School and began randomly shooting at students and school personnel before placing one of the guns in his mouth and killing himself.
Prior gun control legislation in the UK had been influenced by an August 1987 massacre in Hungerford, during which 16 people were killed. After that incident, Parliament passed the Firearms (Amendment) Act of 1988, which banned the ownership of semi-automatic and pump-action rifles, weapons that fire explosive ammunition, short shotguns with magazines, and elevated pump-action and self-loading rifles.
After the Dunblane school shooting, Lord Cullen led the inquiry into the massacre that produced one of the Cullen Reports, which culminated in a successful campaign to outlaw the purchase and possession of handguns (firearms that had been excluded from the legislation passed after Hungerford) via the Firearms (Amendment) Act 1997.
By January 2000, 162,198 handguns had been surrendered to the government in a large-scale buyback program.
Although legislative action following the Dunblane massacre coincided with the last school shooting in the United Kingdom, it did not spell a complete end to mass shootings in that country. On 2 June 2010, 52-year-old Derrick Bird shot and killed twelve people and injured eleven more during an hours-long shooting spree in Cumbria before killing himself.