A new licensing regime for airguns will come into force in July.
Owners of air weapons now have six months to ensure they have a certificate or permit for them or face prosecution.
Anyone who wants to use or own an airgun will have to apply to Police Scotland for an air weapon certificate, or a permit in some circumstances, from July 1, 2016.
It will be a criminal offence to own one without the proper papers from that date and anyone found guilty of committing an offence under the Air Weapons and Licensing (Scotland) Act 2015 could face a fine or two years in prison.
It is designed to crack down on gun crime by tightening access to guns. The Act comes into effect from December 31 this year.
Cabinet Secretary for Justice Michael Matheson laid the Order in the Scottish Parliament today setting out the dates for the new regime to take effect in Scotland.
He said: “This government has a long-standing commitment to eradicating gun crime in Scotland and this new legislation will better protect our communities by taking these potentially lethal weapons out of the hands of those who would misuse them.
“Every day police, the public and animal welfare groups have to face the results of air weapon misuse, from anti-social behaviour to horrific and deliberate injuries to wildlife, pets and very occasionally people.
“We are not banning air weapons outright, but ensuring that their use is properly regulated and users have a legitimate reason for them.
“We believe this legislation strikes the right balance between protecting communities and allowing legitimate shooting in a safe environment to continue.
“We will be publishing clear information on how air weapon owners can apply for a certificate or permit. I would encourage anybody with an air weapon to stay on the right side of the law by using the six months from 1 July to apply for the right to possess an air weapon.”
It is estimated there are currently around half a million unlicensed air weapons in Scotland.
Assistant Chief Constable Mark Williams said: “Police Scotland fully supports the changes to air weapon legislation and in support of these developments will launch an air weapons surrender campaign later this year. This will allow people to hand in any unwanted air weapons before licensing takes effect.”
Police Scotland will also be running a campaign before July 1 to allow people to hand in any unwanted air weapons before licensing takes effect.