Australia will allow gun owners to hand in illegal firearms without penalty next month as concerns grow over crimes involving such weapons.

The three-month amnesty will be the first such nationwide amnesty on surrendered firearms since 1996 when a lone gunman killed 35 people and galvanised support for tough gun controls.

Justice Minister Michael Keenan said on Friday the new amnesty is needed to reduce the number of guns in the community because of new security threats including Islamic extremism.

There have been five violent incidents in Australia that the government describes as terrorist attacks since the national terror threat level was raised in September 2014.

Three involved illegal guns and two involved knives.

Keenan told reporters: "We're living in a time when our national security environment has deteriorated."