As the enormity of the Port Arthur massacre unfolded, John Howard thought to himself: "Heavens above, what's the point of having a huge majority if you can't do something with it."
The result was the National Firearms Agreement, hammered out over the strong opposition of some states and gun owners, banning semi-automatic rifles and shotguns and imposing strict national licensing requirements.
Thirty-five people died and 23 were wounded when lone gunman Martin Bryant opened fire on visitors at Port Arthur, Tasmania on the afternoon of April 28, 1996.
At that time the coalition had been in power for just under two months.
Cabinet documents for 1996 and 1997, released by the National Archives of Australia on January 1, reveal some of the mechanics of implementing the NFA and buying back more than half-a-million banned guns from their owners.
Cabinet historian Paul Strangio said the actual cabinet documents were not as illuminating on the gun law changes as he had hoped.
"A lot of it was done out of Mr Howard's private office and the big arguments were in the party room rather than the cabinet. The tensions were particularly around the National Party," he said.
Guns laws then and now remain the responsibility of states and territories.
Pre-1996, firearms laws varied widely, though following a series of gun attacks, Victoria and NSW had tightened up their laws and there was a growing movement for standardised national laws.
Among the holdouts was Tasmania whose lax laws allowed Bryant to acquire the two military rifles he used at Port Arthur.
The cabinet documents show Tasmania was quick to agree to tighten its laws.
A cabinet minute of April 29 - the day after the massacre - cites an oral report from Tasmanian senator and cabinet minister Jocelyn Newman who said the Tasmanian state government, opposition and Greens had agreed to ban all military style semi-automatic rifles and to introduce registration of all guns.
Mr Howard was at Kirribilli House in Sydney when he was informed of the tragedy.
"Tony Rundle, the then premier of Tasmania, rang me. I went down to Canberra that night and we had a meeting at The Lodge. It was then I started about the idea of national gun laws," he said.
"It was one of these things where there was overwhelming support for what we did in the cities and in most of regional Australia.
"But in certain areas of the bush, people felt aggrieved. They felt they had been deprived and handicapped through the behaviour of a madman."
Mr Howard said he could understand how some of them felt.
"But I just believed overwhelmingly that if you couldn't do this and you weren't prepared to chance your arm on something like this, well what's the point of being in government," he said.
Mr Howard said this was a very difficult time for his colleagues, deputy prime minister and Nationals leader Tim Fischer and his deputy John Anderson.
He believed a referendum to transfer gun law powers to the Commonwealth would have been carried but it became an unnecessary option.
Mr Howard met some of those impacted by the shooting, such as Walter Mikac who lost his wife and two young daughters.
"It was a very early reminder to me that one of the jobs of the prime minister is to comfort and console and embrace and hug people who have had immense tragedy," he said.
Mr Fischer said Australia was a safe place because of those laws, but it wasn't easy.
He recalls an effigy of himself set alight outside a public hall in Queensland as he and the cabinet took their policy around the country.
"If you count 10 or more victims as a gun massacre, we had several before 1996, we've had zero since," he told AAP.
"The US has several every month of every year of the 21st century."
He warned that Australians shouldn't become complacent, and must guard against any attempts to wind back the gun laws.
It's an issue New Zealand Prime Minister Jacinda Ardern will now have to grapple with after promising changes following the Christchurch massacre, which has left at least 49 people dead.
Australian Associated Press
Sign up for our newsletter to stay up to date.