SYDNEY, Australia — Fears of terrorism and an influx of illegal guns prompted Australia Friday to announce the first national firearms amnesty since 35 people were killed in a mass shooting 20 years ago.

The government believes there are as many as 260,00 illicit weapons on the streets, and with the threat of extremist attacks and a spate of gangland shootings, it wants to minimize the danger.

“We are living in a time when our national security environment has deteriorated. Unfortunately, we have seen, through terror attacks in Australia, that illegal guns have been used,” said Justice Minister Michael Keenan. “We believe… now is the time to run another amnesty, with the aim of reducing this pool of illegal guns.”

Australian officials have grown increasingly concerned over the threat of extremist attacks and have prevented 12 on home soil since September 2014. But five have taken place, mostly with guns, including a fatal shootout in Melbourne this month claimed by the Islamic State group.

The amnesty will run from July 1 until September 30, allowing people to hand in unregistered or unwanted firearms with no questions asked. Outside that period people face fines of up to Aus$280,000 (US$212,000) or 14 years jail.

While individual states periodically run amnesties, this is the first national one since 35 people died at the historic Tasmanian colonial convict site of Port Arthur in 1996. The massacre, when lone gunman Martin Bryant went on the rampage armed with semi-automatic weapons, shocked Australia and then-prime minister John Howard enacted tougher gun laws, including bans on certain weapons, a minimum ownership age, and licences.

Gun control measures continue to have strong public support in Australia. More than 600,000 weapons were destroyed in the aftermath of the Port Arthur attack, during a gun buy-back in which compensation was offered.

No money is on offer this time and Keenan admitted many hardened criminals were unlikely to hand in their weapons. But he voiced hope some would heed the call.

“When we have had state-based amnesties, we have seen guns handed in in the thousands and my expectation is this will get a similar sort of number,” he said.

All guns in Australia must be registered but many arrive illegally from overseas through organised syndicates. Canberra set up a new border protection agency merging operations from the customs and immigration departments in 2014, partly to better screen what was coming in.

Keenan said millions of dollars had since been spent since on better tools to detect illegal firearms in the mail or cargo, while a police anti-gang squad had seized 5,500 illicit guns or gun parts since being established in 2013.