Australia is to hold a national gun amnesty, its first in more than two decades, in a bid to combat terrorism and a recent influx in illegal firearms.

The three month amnesty, which begins on July 1, will allow citizens to hand in unregistered weapons without fear of prosecution, the Australian government announced Friday.

Anyone caught in possession of a firearm outside of the allotted amnesty timeframe could face fines of up to A$280,000 ($212,993) or up to 14 years in prison.

The move has been precipitated by a steady increase in the number of unregistered firearms in the country. It is estimated that there are currently 260,000 illegal guns in Australia.

Though there have been several state-based amnesties over recent years, this is the first to be called on a national scale since 1996, when the country was devastated by the Port Arthur Massacre, in Tasmania, which killed 35 people and wounded 23 others.

For several years, authorities have been calling for an overarching policy which they believe could help combat the growing threat of terrorism in the country.

In 2014, a café in Sydney was held under siege by an armed hostage-taker, leaving two people dead. Then, last month, a shootout left one man dead in what authorities are calling a "terrorist incident."

TWEET

"We're living in a time when our national security environment has deteriorated," Australia's Justice Minister Michael Keenan said Friday.

Though Keenan admitted that the moves may not prevent hardened criminals, he said it would help reduce the country's number of illegal guns.

"My expectation is it will probably not be the case that we will have hardened criminals who have made a big effort to get a hold on illegal guns would necessarily hand them in. The purpose is to reduce the number of unregistered and illicit firearms in the community".

The amnesty comes as part of the country's revised 2017 National Firearms Agreement, which has been agreed by state and territory governments.

Follow CNBC International on Twitter and Facebook.