Image copyright Ronald Grant Image caption Shotguns and air rifles are the only firearms you can legally buy in Japan

Japan has one of the lowest rates of gun crime in the world. In 2014 there were just six gun deaths, compared to 33,599 in the US. What is the secret?

If you want to buy a gun in Japan you need patience and determination. You have to attend an all-day class, take a written exam and pass a shooting-range test with a mark of at least 95%.

There are also mental health and drugs tests. Your criminal record is checked and police look for links to extremist groups. Then they check your relatives too - and even your work colleagues. And as well as having the power to deny gun licences, police also have sweeping powers to search and seize weapons.

That's not all. Handguns are banned outright. Only shotguns and air rifles are allowed.

The law restricts the number of gun shops. In most of Japan's 40 or so prefectures there can be no more than three, and you can only buy fresh cartridges by returning the spent cartridges you bought on your last visit.

Image copyright Alamy Image caption A photo posed by models - even Japanese gangsters rarely use guns these days

Police must be notified where the gun and the ammunition are stored - and they must be stored separately under lock and key. Police will also inspect guns once a year. And after three years your licence runs out, at which point you have to attend the course and pass the tests again.

This helps explain why mass shootings in Japan are extremely rare. When mass killings occur, the killer most often wields a knife.

My Perfect Country

In a world where a lot is going wrong there is also a lot going right. So what if you could build a country with policies that actually worked, by homing in ideas around the world that have been truly successful?

The current gun control law was introduced in 1958, but the idea behind the policy dates back centuries.

"Ever since guns entered the country, Japan has always had strict gun laws," says Iain Overton, executive director of Action on Armed Violence and the author of Gun Baby Gun.

"They are the first nation to impose gun laws in the whole world and I think it laid down a bedrock saying that guns really don't play a part in civilian society."

People were being rewarded for giving up firearms as far back as 1685, a policy Overton describes as "perhaps the first ever gun buyback initiative".

The result is a very low level of gun ownership - 0.6 guns per 100 people in 2007, according to the Small Arms Survey, compared to 6.2 in England and Wales and 88.8 in the US.

"The moment you have guns in society, you will have gun violence but I think it's about the quantity," says Overton. "If you have very few guns in society, you will almost inevitably have low levels of violence."

Japanese police officers rarely use guns and put much greater emphasis on martial arts - all are expected to become a black belt in judo. They spend more time practising kendo (fighting with bamboo swords) than learning how to use firearms.

"The response to violence is never violence, it's always to de-escalate it. Only six shots were fired by Japanese police nationwide [in 2015]," says journalist Anthony Berteaux. "What most Japanese police will do is get huge futons and essentially roll up a person who is being violent or drunk into a little burrito and carry them back to the station to calm them down."

Media playback is unsupported on your device Media caption Japanese police practise martial arts every week and avoid using weapons whenever they can

Overton contrasts this with the American model, which he says has been "to militarise the police".

"If you have too many police pulling out guns at the first instance of crime, you lead to a miniature arms race between police and criminals," he says.

Image copyright Getty Images

To underline the taboo attached to inappropriate use of weapons, an officer who used his gun to kill himself was charged posthumously with a criminal offence. He carried out the act while on duty - policemen never carry weapons off-duty, leaving them at the station when they finish their shift.

The care police take with firearms is mirrored in the self-defence forces.

Journalist Jake Adelstein once attended a shooting practice, which ended with the gathering up of the bullet casings - and there was great concern when one turned out to be missing.

"One bullet shell was unaccounted for - one shell had fallen behind one of the targets - and nobody was allowed to leave the facilities until they found the shell," he says.

There is no clamour in Japan for gun regulations to be relaxed, says Berteaux. "A lot of it stems from this post-war sentiment of pacifism that the war was horrible and we can never have that again," he explains.

Image copyright Reuters Image caption There are a limited number of longstanding rifle owners in Japan - when they die their heirs must hand the rifles in

"People assume that peace is always going to exist and when you have a culture like that you don't really feel the need to arm yourself or have an object that disrupts that peace."

In fact, moves to expand the role of Japan's self-defence forces in foreign peacekeeping operations have caused concern in some quarters.

"It is unknown territory," says political science professor Koichi Nakano. "Maybe the government will try to normalise occasional death in the self-defence force and perhaps even try to glorify the exercise of weapons?"

According to Iain Overton, the "almost taboo level of rejection" of guns in Japan means that the country is "edging towards a perfect place" - though he points out that Iceland also achieves a very low rate of gun crime, despite a much higher level of gun ownership.

Henrietta Moore of the Institute for Global Prosperity at University College London applauds the Japanese for not viewing gun ownership as "a civil liberty", and rejecting the idea of firearms as "something you use to defend your property against others".

But for Japanese gangsters the tight gun control laws are a problem. Yakuza gun crime has sharply declined in the last 15 years, but those who continue to carry firearms have to find ingenious ways of smuggling them into the country.

"The criminals pack the guns inside of a tuna so it looks like a frozen tuna," says retired police officer Tahei Ogawa. "But we have discovered cases where they have actually hidden a gun inside."

Join the conversation - find the BBC World Service on Facebook and Twitter.

Follow Harry Low on Twitter: @HarryLow49