The horrifying mass shooting at Marjory Stoneman Douglas High School offered yet another tragic reminder of America's gun problem: The US has much more firearm violence than its developed peers.

One reason for this difference is the abundance of guns in America. According to a 2007 survey, the US led the world in the number of civilian-owned firearms with 88.8 guns per 100 people, while second-place Yemen fell far behind at 54.8 guns per 100 people. And the research, compiled by the Harvard School of Public Health's Injury Control Research Center, has repeatedly found a link between a higher number of guns and higher levels of gun violence.

A common explanation for this is that America has some of the most lax gun laws in the world. But are US gun laws really that different from those of other developed nations?

I looked into that question, breaking down gun laws in several developed countries based on media reports, studies on gun violence, national databases, the Law Center to Prevent Gun Violence's analysis of American gun laws, and the Law Library of Congress's reviews of gun laws around the world.

I found the US really does have the most relaxed gun control measures in comparison with other developed nations.

Based on the research, that's a significant reason the US leads its developed peers in gun violence. A 2016 review of 130 studies in 10 countries, published in Epidemiologic Reviews, found that new legal restrictions on owning and purchasing guns tended to be followed by a drop in gun violence. That's a strong indicator that restricting access to guns can save lives.

Here's a guide to the gun control laws of some of the countries I looked at: the US, the United Kingdom, Canada, Switzerland, and Japan — a mix of wealthy nations with similar and varying cultural backgrounds.

United States

Gun ownership rate (2007): 88.8 guns per 100 people

Gun homicide rate (2012): 29.7 per 1 million people

How gun control works: There are several barriers to buying a gun in America, but there are generally so many loopholes in the current laws — even fairly restrictive city and state laws — that most people can buy a gun without too much of a problem.

Some people are technically prohibited from buying guns. People who are underage (under 18 for rifles and shotguns, and under 21 for other guns), someone convicted or indicted for a crime punishable by imprisonment of more than one year, fugitives from justice, the severely mentally ill, unlawful users of controlled substances, those convicted of domestic violence, and undocumented immigrants are among some of the categories of people barred from buying a firearm by federal law.

Some types of guns are also restricted. Under federal law, fully automatic weapons are technically legal only if made before 1986, so it's illegal to manufacture new automatic weapons for civilian use. Automatic weapons also tend to have more restrictions and registration requirements than other guns. Meanwhile, semiautomatic and non-automatic firearms are generally legal, barring state laws. And some states also ban high-capacity ammunition magazines.

Restrictions on purchasers are typically evaluated through a background check. Under the federal system, licensed dealers are required to run these checks before they can sell someone a gun, typically by having the FBI check a person's criminal record, mental health history, and other factors. If someone fails a background check, he or she can't legally buy a gun.

The most well-known way to bypass background checks is the private sales loophole: If someone purchases a gun from a private seller, such as a friend or family member, no gun background check is required. This is often mischaracterized as the gun show sale loophole, under the assumption that people can simply go to a gun show and buy a gun without getting a background check. But licensed dealers at gun shows still have to carry out a background check. The actual loophole is that someone can meet with a private seller at a gun show — or, increasingly, over the internet — and buy a firearm from that person without a background check. In other words, the gun show doesn't create a loophole; the private seller does.

But an equally big problem is that the system of background checks is notoriously underfunded, understaffed, and underresourced, allowing red flags to slip through. Although there are no waiting periods under federal law, a check that turns out inconclusive can be extended for three business days for further investigation. But these three days are a maximum for the government — and sometimes, the three days lapse without the FBI completing its check, and a buyer can, at that point, purchase a gun without the completed check.

The FBI admitted that something like this happened for Dylann Roof, who killed nine people at a predominantly black church in Charleston, South Carolina, in 2015: Roof should have failed a background check for a handgun purchase after admitting to illegally possessing controlled substances in the past, but the FBI examiner did not obtain the shooter’s record in time.

The federal background check system also largely relies on states' reports, including some data for mental health history and criminal records. Since states have their own budget issues to deal with, or may simply ideologically oppose the idea of background checks, states' noncompliance can create yet another way the system can fail to stop someone who shouldn't buy a gun from obtaining one.

Of course, state laws vary widely. Some states restrict and ban certain types of firearms, particularly assault weapons. A few require certain licenses, registration, or training to buy and own certain guns. Several states ban or restrict open carry, and many require permits for concealed carry. Some require background checks and permits for private sales, and several rely on their own background checks instead of only the federal system. And many states try to make it as easy as possible to buy, own, and carry any type of gun. (Slate has a good rundown of differences in state laws.)

Many gun restrictions are limited by the Supreme Court's recent interpretations of the Second Amendment. For instance, the court struck down Washington, DC's handgun ban in 2008, citing an individual's right to bear arms.

Broadly speaking, studies have found that states with stricter gun control laws have fewer gun deaths, and places — not just states, but cities and countries, too — with fewer guns have less gun violence after controlling for socioeconomic variables and other types of crime.

Generally, America's gun laws are far more relaxed than those of the other countries on this list. And even if your city or state is restrictive, interstate travel is so easy that it's fairly easy to go to another state to buy a gun, although this runs afoul of some states' laws. Several analyses of places with restrictive gun laws — Chicago and Illinois or "the Iron Pipeline," for example — have found that's exactly what happens in many cities and states, with guns typically flowing in from neighboring or nearby jurisdictions with laxer gun laws. The result: If you want to buy a gun in America, there's almost certainly a way to do just that, regardless of your local laws.

Canada

Gun ownership rate (2007): 30.8 guns per 100 people

Gun homicide rate (2012): 5.1 per 1 million people

How gun control works: Canada keeps guns somewhat accessible to the general population, but maintains major restrictions on different types of guns, who can buy them, and how they're purchased. The result is a system that looks like a stricter version of the US — so some sort of firearm ownership is still a possibility, but not something that's done very easily.

Canada puts guns into three categories: prohibited (most handguns that have a short barrel or are .32 or .25 caliber, fully automatic weapons, guns with sawed-off barrels, and certain military rifles like the AK-47), restricted (some handguns, some semiautomatic rifles, and certain non-semiautomatic rifles), and non-restricted (regular and some military-style shotguns and rifles). The general idea is that more dangerous guns face much harsher regulations and restrictions on purchase, ownership, and storage.

Prohibited guns are, as their name implies, prohibited, but people who obtained and maintained a registration certificate before they were banned in December 1998 can keep those specific guns. All restricted and prohibited firearms must be registered, but non-restricted guns no longer have to be registered after April 2012.

In general, you must be 18 or older to buy a gun in Canada. Some exceptions are made for minors 12 to 17 owning a non-restricted firearm — but only if a licensed adult is responsible for the gun.

Canada requires a license to own a gun and ammunition, and buyers to pass safety course tests. Licenses must be renewed every five years.

Licensing requires fairly stringent background checks. An "applicant for a firearm license in Canada must pass background checks, which consider criminal, mental, addiction and domestic violence records," according to the Library of Congress's review of Canada's laws. The background checks also consider whether an applicant has been treated for a mental illness, if the person was associated with violence, threats, or attempted violence, and whether the person has a history of any behavior "that includes violence or threatened or attempted violence on the part of the person against any person." On top of traditional background checks, each license applicant needs to submit third-party character references.

In addition to licensing requirements, Canadians can only obtain a permit to carry firearms in public in very limited circumstances — typically with the requirement that "an individual needs restricted firearms or prohibited handguns for use in connection with his or her lawful profession or occupation" or to protect life. There are no such federal requirements in the US, although some states place certain restrictions or bans on concealed and open carry.

Unlike federal laws in the US, Canadian laws require safe gun storage — locked in a room, compartment, or container that's difficult to break into, with a trigger or cable lock, or both, depending on the type of firearm. Guns must be unloaded when stored. And similar storage requirements apply to guns that are being transported, with laxer rules for non-restricted firearms compared to prohibited and restricted ones.

United Kingdom

Gun ownership rate for England and Wales (2007): 6.2 guns per 100 people

Gun homicide rate for England and Wales (2012): 0.7 per 1 million people

How gun control works: The United Kingdom maintains some of the strictest gun laws in the West and the world, which helps explain why it also has some of the lowest levels of gun homicide among developed nations.

For one, handguns are generally banned, with exceptions only for police officers, members of the armed forces, and people with special permission from the home secretary. Military-style weapons are also prohibited.

For other types of firearms and ammo, individuals must go through a stringent licensing process. They must give a "good reason" — such as job requirements, sport, or shooting vermin — to own a gun. Self-defense is not considered a good reason. Local police chiefs are expected to verify that an applicant's reasons for owning a gun are legitimate. For example, police might see if a person really has vermin in his or her house to the point that it requires a certain type of gun to deal with the pests.

Gun owners also must meet background checks, which involve a review of a person's criminal record, mental illness, alcoholism, drug addiction, and references regarding mental state, home life, and attitudes toward guns. Licenses must be renewed every five years, although they can be revoked earlier if police find that someone's gun ownership poses public safety risks or a person no longer has a good reason for the license.

The UK also has an age requirement of 18 for gun ownership. Firearm ownership also might involve storage requirements that meet "British safety standards," which are evaluated by local police, who particularly check the possibility of unauthorized access to guns by an owner's family members or other associates.

One major exemption to the licensing requirements: People can participate in gun clubs even if they don't hold a certificate "when engaged as a member of the club in connection with target shooting," according to the Library of Congress's review of UK laws. But these gun clubs must meet all sorts of criteria, including security and storage arrangements for guns and ammo.

Gun laws can be enforced very strictly: Anyone found unlawfully possessing a firearm faces a five-year mandatory minimum prison sentence.

The UK passed many of its gun restrictions in response to public outcry after several mass shootings. One of the shootings sounds eerily like the Sandy Hook Elementary School shooting that took place in Connecticut in 2012, as described by Clare Feikert-Ahalt for the Library of Congress: In 1996, "Thomas Hamilton walked into a primary (elementary) school in Dunblane, Scotland, and shot and killed 16 small children, aged four to five, and their teacher in the school gym before killing himself. Hamilton lawfully held the two rifles and four handguns that he used for the massacre, and had lawfully held firearms for almost 20 years prior to this incident."

According to Feikert-Ahalt's report, law enforcement's consensus in the UK is that the restrictions did not stop all gun violence, but did limit it. And although the rules are strict, more than 700,000 certificates were in effect for the period between 2008 and 2009, suggesting that gun ownership is certainly possible despite the hurdles involved.

Switzerland

Gun ownership rate (2007): 45.7 guns per 100 people

Gun homicide rate (2012): 7.7 per 1 million people

How gun control works: Switzerland is perceived to have one of the more accepting cultures toward guns in Europe. Laws let militia members in the country (where all able-bodied men are required to serve in the military, except for conscientious objectors) keep their issued personal weapons in their homes, and Swiss statutes and traditions respect the right to bear arms.

But the country's restrictions are still somewhat more stringent than the US.

For one, automatic weapons are outright banned for civilians.

Private gun ownership generally requires a license, for which an applicant "must be at least 18 years of age, may not have been placed under guardianship, may not give cause for suspicion that he would endanger himself or others with the weapon, and may not have a criminal record with a conviction for a violent crime or of several convictions for nonviolent crimes," according to the Library of Congress's review of Swiss gun laws. The license is valid for six to nine months, and it's usually valid only for one weapon.

But rifles and semiautomatic long arms used by recreational hunters are exempt from licensing requirements.

The licensing requirement also only applies to dealers, with an exemption for private sellers. Still, the law requires private sellers to verify the identity and age of the buyer by checking an official identification document, and private sellers must have no reason to believe the buyer has been or should be disqualified from firearm ownership — requirements that aren't necessary for private gun sales under US federal law.

For anyone to carry a gun for defensive purposes, the licensing process requires the applicant to demonstrate the need to protect himself or others and pass an exam. But no carrying license is required for transporting an unloaded weapon for "legitimate purposes" like hunting and traveling to a shooting range, as long as the ammo is kept separate from the weapon. In comparison, the license to carry is a requirement that only exists in a minority of US states.

In recent years, Switzerland has reformed its gun laws for militia members after several incidents in which militia members killed themselves or others with their issued weapons. In 2010, for instance, rules were amended to let militia members voluntarily deposit their guns in an armory. And if police, courts, prosecutors, or a military commandant finds danger of abuse or improper handling or maintenance of a militia member's personal weapon, it can be confiscated — with the possibility of further punishments, including fines and imprisonment.

Switzerland's restrictions show that a country can have a culture that is broadly more receptive to the idea of gun ownership while maintaining some restrictions that make firearms less accessible to potentially dangerous people and improve public safety. But it's perhaps no coincidence that the country is second only to America among developed nations in terms of firearm homicide deaths — although the Swiss rate is still four times lower than the US's rate.

Japan

Gun ownership rate (2007): 0.6 guns per 100 people

Gun homicide rate (2012): 0.1 per 1 million people

How gun control works: Japan makes it very hard to buy and own guns, with some of the strongest gun control laws in the world. The system is so restrictive that even Japan's criminals, which through the notorious yakuza can be highly ingrained in corrupt government agencies, largely see gun ownership as a liability, as Vox's Zack Beauchamp explained.

"Under current laws, if a low-level yakuza is caught with a gun and bullets that match, he’ll be charged with aggravated possession of firearms and will then face an average seven-year prison term," longtime Japan correspondent Jake Adelstein wrote in the Japan Times. "Simply firing a gun carries a penalty of three years to life. And … a yakuza boss may decide a death sentence is more appropriate if his thug miraculously gets released on bail before going to jail [because accomplice laws could get the boss indicted along with his subordinate]."

In a 2012 article for the Atlantic, Vox's Max Fisher explained the rigorous process for buying and owning a firearm, which can only be done for special purposes like hunting, professional necessity, and gun competitions:

To get a gun in Japan, first, you have to attend an all-day class and pass a written test, which are held only once per month. You also must take and pass a shooting range class. Then, head over to a hospital for a mental test and drug test (Japan is unusual in that potential gun owners must affirmatively prove their mental fitness), which you'll file with the police. Finally, pass a rigorous background check for any criminal record or association with criminal or extremist groups, and you will be the proud new owner of your shotgun or air rifle. Just don't forget to provide police with documentation on the specific location of the gun in your home, as well as the ammo, both of which must be locked and stored separately. And remember to have the police inspect the gun once per year and to re-take the class and exam every three years.

In addition to these requirements, there are age restrictions for gun ownership — 18 generally, 14 for athletes, and 20 for hunters. People can't fire their guns except for the specific reasons given for obtaining a firearm in the first place. And officials have enormous authority for supervising someone's gun ownership, including the ability to conduct nationwide inspections of gun owners' weapons and storage facilities — with prior notice to gun owners — and the ability to require owners to temporarily submit guns to the authorities following a disaster or incident that disturbs the public peace.

On top of those restrictions, there's a separate permit for buying ammunition, which can also limit how much ammo someone can buy.

Civilian possession of handguns is also banned, except for research purposes.

Partly as a result of its stringent laws, Japan has very low levels of gun violence — not just compared with the US, but compared with any other country. As Fisher wrote in 2012, there was a bit of a national scandal when the number of gun homicides in Japan — a country of nearly 130 million — rose from two in 2006 to 22 in 2007, even though both are shockingly low rates of gun homicides. In 2013, the gun homicide rate was 350 times higher in the US than in Japan.

None of this is to suggest that one could simply import Japanese — or other nations' — gun laws to the US, easily implement such policies, and see US gun violence fall to match its developed peers. After all, the US, Japan, the UK, Canada, and Switzerland are very different countries with varied cultural and socioeconomic influences. And non-US countries started with comparatively few guns in circulation, so it's been relatively easy to restrict guns and keep their prominence low — whereas the US now has more guns than people, so it would be much harder to scale back access to firearms and levels of gun ownership.

But based on the research and other countries' experiences, more restrictive gun laws could at the very least make shooting deaths much less common in the US.

Watch: America's gun problem, explained in 18 charts