Under current Swedish gun laws, anyone over 18 who does not have a criminal record can apply for a permit for a shotgun, handgun or semi-automatic rifle.
They must justify to the police why they need a gun. People over 20 can apply for a special dispensation to own a fully automatic weapon.
Around 580,000 Swedes have a weapons licence out of a population of around 10.5 million, according to figures from Swedish broadcaster SVT.
A 2017 Swiss study found there were about 2.3 million guns held by civilians in Sweden. That is around 23 guns per 100 people, compared with 29 in Norway and 120 per 100 in the US.
To obtain a hunting licence in Sweden, a theory and practical test is required. About 280,000 Swedes have one.
Sweden has a relatively high level of gun ownership and gun crime, by European standards, though most weapons are legally owned and used for hunting.
Gun crime is mostly associated with gangs, who have also taken to using bombs to target one another.
Non-gang-related gun crime is less common, and Tuesday’s attack the nation’s first school shooting and its worst mass shooting. A total of four people were killed in two separate school stabbings in 2015 and 2022.