New Zealand's Prime Minister Jacinda Ardern has announced details of major gun law reforms following last Friday's mass shooting at two mosques.
The country will ban all military-style semi-automatic weapons and all assault rifles, she said, a move which was "making sure this never happens again".
Not every country reacts to mass shootings by changing the law. But there have been some notable examples where tragedies have led to a complete overhaul of legislation.
In 1996, 35 people were killed with illegally-owned guns around the historic site of Port Arthur in Tasmania.
The Australian government reacted by requiring states to ban all semi-automatic and self-loading weapons, and restricted certain other types of handgun.
It also introduced a comprehensive registration and licensing system and made the requirements for owning a gun tougher. A mandatory buyback scheme resulted in at least 600,000 guns being handed over to the authorities.
In the two decades before the law changed, there were 13 mass shootings.
In the more than 20 years since the law changed, there have been two mass shootings where four or more people were killed.
Two people were also killed in a shooting at a university campus in Melbourne, which led to further law changes.
Studies suggest that aside from the victims of the Port Arthur shooting, 69 gun homicides were recorded in 1996 compared with 30 in 2012. There was also a major reduction in firearms suicides with no comparable reduction in suicide by other means.
In 1996, a gunman opened fire at a primary school in Dunblane, Scotland, killing 16 pupils and a teacher. The handguns he had with him were owned legally with a firearms certificate.
The shooting led to a change in the law in Scotland, England and Wales which effectively outlawed all private ownership of handguns.
An amnesty led to the surrender of 165,353 licensed handguns and 700 tonnes of ammunition by the spring of 1999.
This built on law changes that had been introduced a decade earlier, after a mass shooting in Hungerford in the south of England, which was also carried out with legally licensed firearms.
The law change following the 1987 killings banned most semi-automatic long-barrelled weapons and some types of ammunition.
In Scotland, there was a fall in gun crime following Dunblane. By 2015-16, offences had fallen to levels not seen for more than 30 years.
But in England and Wales, there was a rise in gun crime in the years immediately following Dunblane.
Peter Squires, a criminologist professor at the University of Brighton ,says this was not to do with law changes, but largely to do with changes in the gun market, including a trend for replica and air weapons.
This was followed by a fall in firearms offences from the early 2000s.
Part of the initial reduction was down to the fact that offences involving air weapons were taken out of firearms legislation and brought under anti-social behaviour legislation.
But even after this reclassification, there was still a significant and relatively consistent fall in gun crime, excluding air weapons, until 2016.
As this was against a backdrop of generally falling violent crime in that period, we cannot pin the fall on gun laws alone.
Recently there have been reversals in this trend - violent crime in England and Wales has risen by 19% in a year, although this was chiefly driven by a rise in knife crime.
Between 2002-03 (when recording changed) and 2014-15, firearms offences, excluding air weapons, fell from 10,248 to 4,911 but have since risen to 6,521 in 2017-18.
There has been one mass shooting in Britain since Dunblane - in Cumbria in 2010.
In 1989, a school shooting in Montreal, during which the gunman specifically targeted girls and women, led to a national debate around gun control.
The weapons he used were legally held.
A law was passed in 1991 in response to the shooting, restricting automatic and semi-automatic weapons. It also introduced a 28-day waiting period to apply for a firearms certificate and further background checks.
The requirement to pass a firearms safety course was introduced later.
The debate around this legislation led to a further law being passed, which meant all non-restricted weapons had to be registered. This requirement was repealed in 2012 and has been a source of debate since.
Findings from studies on the impact of Canada's gun control legislation have been mixed.
A 2004 study found "a significant decrease after [the passage of the 1991 Bill] in the rates of suicides and homicides involving firearms and the percentage of suicides using firearms".
But others have been more hesitant in drawing causal links.
Deaths by shooting excluding suicide fell considerably between 1991 and 2011, when firearms homicides hit their lowest level in 50 years.
Homicides by all means fell during that period.