With three mass shootings claiming more than 34 lives in a span of a week - including one in Gilroy, Calif. -- the nation is again debating the use of guns, mental illness and how to best curb the never-ending spate of death and violence.

KTVU set out to compile facts about mass shootings, guns and legislative efforts on the topic -- independent of the political debate.

Here's a look at what we found:

Table of contents:

Mass shootings and assault rifles

California: by the numbers


International view

Gun dealers

Background checks

Gun violence research and mental health

Second Amendment

Legislative efforts

Resources and Source Material

What is a mass shooting?

There is some debate over this. Some groups, such as Congress and Mass Shooting Tracker, define a mass shooting as three or more people shot -- even if they don't die -- and not including the shooter. And the shooting must not be identifiably gang, drug, or organized crime related.

However, the Gun Violence Archive defines mass murders as every time where four or more people are shot or killed, not including the shooter. And under this definition, gang and domestic violence deaths are included.

Meanwhile, the FBI calls mass shootings "active shooter incidents," and they exclude drug and gang violence and "accidental discharges of a gun." The FBI counts "mass murders" where four or more people are killed.

Source: Stanford Mass Shootings in America, courtesy of the Stanford Geospatial Center and Stanford Libraries, Gun Violence Archive, FBI

CHP officer killed during gunbattle in Southern California

How many mass shootings have there been in the U.S.?

There have been 302 mass shootings so far this year in 2019 and more than 2,660 mass shootings since Jan. 1, 2013, according to the Mass Shooting Tracker.

Using FBI data and criteria, where four or more people are killed, however, there have been just 26 incidents so far this year, where 147 people were killed and 85 were injured.

Source: Mass Shooting Tracker and FBI

What is an assault rifle?

From the Oxford Dictionary, an assault rifle is a "rapid-fire, magazine-fed automatic rifle designed for infantry use." But the term, assault rifle, has become a common phrase that encompasses both semi- and automatic guns.

Assault weapons are not used in most of the mass shootings, but they have proven to be the most deadly.

Assault rifles were first used during World War II. The term assault rifle is generally attributed to Adolf Hitler, who, for propaganda purposes, used the German word Sturmgewehr (which translates to "assault rifle") as the new name for the MP43. However, other sources dispute that.

There are many types of assault rifles. Some examples include:

An AR-15 is a type of semi-automatic rifle that looks similar to the military's M-16, but is available to civilians. The NRA said the AR-15 is the most popular rifle in the United States.

Semi-automatic weapons like the AR-15 reload automatically but fire only once each time the trigger is depressed. This type of gun is known for being lightweight and customizable where users can change calibers by swapping out barrels and magazines. They can even add accessories like laser sights, flashlights and mix and match parts from other weapons.

Source: The Atlantic, Giffords Law Center, Oxford Dictionary, NRA

San Jose mayor proposes 1st-in-nation insurance requirement for gun owners

What is a large-capacity magazine?

Large-capacity magazines enable shooters to fire repeatedly without having to reload and can be added to any semi-automatic gun. California and eight other states ban magazine with more than 10 rounds. Different states have different guidelines on what constitutes large-capacity. Some magazines can hold up to 100 rounds of ammunition. The shooter who killed 20 children and six adults at Sandy Hook Elementary School in Newtown, Conn., in 2012 equipped his assault weapon with 30-round magazines, which enabled him to fire 154 rounds in less than five minutes.

Source: Giffords Law Center

Four shot in San Francisco's Fillmore District

Are assault rifles and large-capacity magazines legal?

Yes and no.

The federal government banned gun owners from owning semiautomatic assault weapons and large-capacity ammunition magazines under the Violent Crime Control and Law Enforcement Act from 1994 to 2004. But the law expired and lawmakers have failed to renew it.

Now, only these nine states ban large-capacity magazines: California, Colorado, Connecticut, Hawaii, Maryland, Massachusetts, New Jersey, New York, and Vermont.

California, Connecticut, Hawaii, Maryland, Massachusetts, New Jersey, and New York have banned assault weapons. Minnesota and Virginia have some assault-weapon regulations.

In the rest of the country, the large-capacity magazines and assault weapons are allowed.

However, in March, the Trump administration banned "bump stocks," or attachments that could allow semi-automatic rifles to mimic automatic weapons, after an October 2017 mass shooting in Las Vegas involving a rifle modified with a bump stock killed 58 people.

Source: California Attorney General, Giffords Law Center, ATF

Types of guns used in recent U.S. mass shootings

What types of guns were used in the most recent mass shootings?

El Paso, Texas: Police have not yet said what type of gun Patrick Crusius, 21, used to kill 22 people at a Walmart on Aug. 3. But in a four-page manifesto he likely wrote, the author lamented that his WASR 10 semiautomatic rifle, an AK-47 variant, couldn't match the deadliness of an AR-15. So, to boost his weapon's killing capacity, he sought out 8M3 ammunition, a hollow-point rifle round known for its ability to expand and fragment on impact, creating catastrophic wounds. The gunman described the 8M3 as a "bullet unlike any other." It's unclear if he ever actually got all that weaponry. It's legal in Texas to buy these high-powered firearms.

Dayton, Ohio: Connor Betts used a .223 caliber high-capacity AR-15 pistol equipped with a 100-round drum magazine, enabling him to unload 41 rounds in 30 seconds on Aug. 4. This type of gun and ammunition is legal in Ohio. He bought his AR-style weapon online and had it shipped from Texas to a gun store in Ohio, where he picked it up. He killed nine people and injured dozens more.

Gilroy, Calif.: Santino Legan, 19, used a WASR-10 semi-automatic rifle with a detachable magazine which he bought legally at Big Mikes Gun and Ammo in Fallon, Nev. to kill three people at the Gilroy Garlic Festival on July 28 . It's legal to buy a gun in Nevada for anyone 18 or older. The rifle is also legal by federal standards.

Is it legal to bring an assault weapon from a state that allows them to a state that doesn't?

No - under most circumstances. But in most cases, there is no one watching. However, if you are later found in California with an illegal gun purchased elsewhere, then you can be prosecuted. Many gun possession crimes are felonies in California.

The NRA notes that there is a provision of federal law known as the Firearms Owners' Protection Act protects those who are transporting firearms for lawful purposes from local restrictions which would otherwise prohibit passage.

In most states, the NRA notes, firearms may be transported legally if they are unloaded, cased, and locked in the automobile trunk or otherwise inaccessible to the driver or any passenger. The exceptions to this rule apply mainly to transportation of handguns and so-called "assault weapons." The NRA said this "myriad and conflicting legal requirements for firearm transportation through the states make caution the key for travelers of which you must consult local law."

Source: NRA

How many guns are recovered and traced in California?

A total of 41,527 guns were recovered and traced in California in 2017 and 17,397 of those were bought in California. Only a little more than a third of the guns came from other states: Arizona (2,185) and Nevada (1554).

The cities with the highest firearms recovery in California: 1. Los Angeles(5,428) 2. Sacramento (2,010) 3. Oakland (1,033) and San Francisco (903.)

Source: ATF Firearms Tracing System

How many guns are there in California?

Roughly 4.2 million, or 14 percent of adults, own firearms in California. More than half -- 54 percent -- of them have one or two firearms, and 10 percent own 10 or more firearms. That's about 20 million firearms in California, of which, 9 million are handguns. Roughly 17 percent of recent gun buyers in CA reported they did not undergo a background check.

Source: UC Davis Violence Prevention Research Program/2018 California Safety and Wellbeing Survey

How many guns are sold in California?

A total of 798,920 handguns and rifles were sold in California in 2018. That's down from 882,585 in 2017 and 1,331,322 in 2016. A total of 6,061 firearms were denied to prospective buyers.

Source: Office of Attorney General

Despite strict gun laws California has 1 million assault weapons, researchers say

What types of guns are most used in California?

Fifty percent are other types of long guns like rifles or shotguns and 45 percent are handguns. Five percent of guns owned in California are assault-style rifles.

Source: UC Davis Violence Prevention Research Program/2018 California Safety and Wellbeing Survey

What types of guns are most used to kill in the United States?

Handguns are used by far the most to kill people. Next is unspecified firearms, third is shotguns and fourth is rifles.

Source: Gun Violence Visualized / FBI Expanded Homicide Data Table 4, 2009-2016

How many guns are there in the world?

There were approximately 857 million civilian-held firearms in the world at the end of 2017 and 393 million of those are in the United States - by far the highest number of any country.

National ownership rates vary from about 120.5 firearms for every 100 residents in the United States to less than one firearm for every 100 residents in countries like Indonesia, Japan, Malawi, and several Pacific island states. The author notes that poor record keeping makes it impossible to know the total number of all guns.

Source: Small Arms Survey/Aaron Karp

International look at guns and homicides:

The homicide rate in the United States was 7.5 times higher than the homicide rate in the other high-income countries combined, which was largely attributable to a firearm homicide rate that was 24.9 times higher, according to federal research published this year.

Source: US National Library of Medicine and the National Institutes of Health

What does it take to a buy a gun in the U.S.?

Federal law and the laws in most states continue to allow unsupervised access to firearms by people younger than 21. There is no minimum age to possess a long gun under federal law. Connecticut, Hawaii, Illinois, Iowa, Maryland, Massachusetts, New Jersey, New Mexico, New York, Washington, and the District of Columbia impose minimum age requirements for the possession of handguns which are stricter than the federal minimum of 18.

Source: Giffords Law Center

What does it take to buy a gun in Canada?

To buy a handgun in Canada, you first need to pass a mandatory safety course, which includes 10 hours of classroom instruction. In order to pass, you need to get at least 80 percent on a written test and a hands-on practical test.

Then you can apply for a license. Your spouse or partner has to sign off on the application and you have to provide two character references.

Finally, you have to pass a background check. Besides your criminal history, authorities look at your mental health and domestic violence histories.

Then, there's a mandatory 28-day waiting period. If you're approved, you can buy a gun and register it with authorities.

Your license is good for five years, and during that time you'll go through daily automatic background checks.

Source: KTVU reporting/ Royal Canadian Mounted Police

Where can you buy guns in California?

People can buy guns in stores and gun shows depending on city and county rules, as well as online. The transaction must be done by a California licensed dealer under the Dealer's Record of Sale process. If you buy guns online in California, you still have to pass a background check.

Source: UC Davis Violence Prevention Research Program/2018 California Safety and Wellbeing Survey

Is there a limit of handguns that can be bought or sold California?

There is no limit to the number of handguns that you may own but you are generally limited to purchasing no more than one handgun in any 30-day period.

Source: California Attorney General

Who cannot buy a gun in California?

Anyone who has been convicted of a felony or certain misdemeanors, anyone who is a drug addict or anyone who has been held involuntarily as a danger to themselves cannot buy a gun in California. The full list is here.

Source: California Attorney General

What is a background check?

Enacted in 1993, the Brady Act is a federal law that requires federally licensed firearms dealers to conduct background checks on anyone who wants to buy a gun. To comply with the law, the FBI created the National Instant Criminal Background Check System. Among other things, the NICS contains information about people's criminal and mental health histories and any civil orders that might affect their eligibility to own a gun, such as domestic violence restraining orders.

To date, at least three million people have been denied a firearm transfer or permit through the FBI's background check system, mostly because the check came back that the person is a felon or a fugitive.

What is the "default proceed" provision and a "prohibited person?"

Unlicensed, private sellers are not required to conduct background checks. This means that, unless state law requires a background check for these sales, convicted felons and domestic abusers can legally buy guns — even though they would fail a background check if purchasing from a federally licensed dealer. Twenty one states have closed the federal loophole to require unlicensed sellers to conduct background checks on some or all firearms purchasers.

A "default proceed" provision under federal law allows a licensed dealer who has started a background check -- but has not been notified within three business days that the sale would violate federal or state laws -- to then sell the gun "by default." This provision allowed nearly 5,000 prohibited purchases to buy guns in 2017 before a background check cleared. The FBI sampled about 2,500 default-proceed transfers to a "prohibited person" and found that an average of 25 business days had elapsed between the first background inquiry and the date the FBI determined the sale should not go through.

The FBI has recommended extending the three-day period to allow agents more time to complete background check investigations and to reduce the number of prohibited purchasers who are able to purchase firearms by default. Some states, including California, Colorado and Florida, impose stricter rules, barring dealers from transferring guns to customers until a background check clears or a certain period of time elapses, whichever occurs first.

While customers must present ID when buying a gun, federal law does not provide a mechanism for dealers to ensure that these identification documents are valid.

In addition, 28 states issue licenses that exempt the holder from the federal background check requirement at the point of sale.

Source: Giffords Law Center

Facts about gun dealers:

Over 56,600 people in the country currently have "Type 1" federal firearms licenses, which allow them to act as firearms dealers, and almost 8,000 people have "Type 2" licenses, which allow them to buy and sell guns as pawnbrokers. About 71,452 people have other types of federal firearms licenses. Federal dealer licenses are in high demand because a dealer may purchase unlimited quantities of firearms through the mail, at wholesale prices, without being subject to background checks or any state or local waiting periods.

Source: Giffords Law Center

Gun dealer oversight:

As a result of inadequate staffing, the Bureau of Alcohol, Tobacco, Firearms and Explosives was able to inspect less than 10 percent of federal firearm licensees in 2009 and, on average, dealers are inspected only once a decade. Anyone who deals in firearms without the required license could face up to five years in prison and be fined $250,000.

Source: Washington Post

Gun violence research:

From 1986 to 1996, the U.S. Centers for Disease Control and Prevention sponsored peer-reviewed research into the underlying causes of gun violence. People who kept guns in their homes did not — despite their hopes — gain protection, according to research published in the New England Journal of Medicine. Instead, residents in homes with a gun faced a 2.7-fold greater risk of homicide and a 4.8-fold greater risk of suicide. The National Rifle Association moved to suppress the dissemination of these results and to block funding of future government research into the causes of firearm injuries. For more than 20 years, an appropriations rider known as the Dickey Amendment has prevented the CDC from using funds to "advocate or promote gun control."

In May, Congresswoman Carolyn B. Maloney (D-NY) and Senator Edward J. Markey (D-MA), lead sponsors of the Gun Violence Prevention Research Act of 2019, cheered a proposed House Labor-HHS-Education funding bill for fiscal year 2020 includes $50-million for gun violence research.

Source: Washington Post and Congresswoman Maloney

Scant connection between mental illness and violent crime

A study released this year and led by researchers at the University of Texas, shows news media coverage and political rhetoric has shaped the flawed public perception and narrative that mass shootings are connected to mental illness, ultimately, influencing policymaking. It found mental conditions like depression, anxiety, PTSD and ADHD have no connections to violence and only about 4 percent of violent crime in the United States stems from those with a mental illness.

Mental illness rarely leads to gun violence researchers conclude

Extensive research done at UC Davis by the Violence Prevention Resource Program shows being male, facing rejection, or suffering recent trauma can be greater risk factors for gun violence. That risk increases if there's also alcohol abuse, drug abuse, or a prior history of violence. Specifically, domestic violence can be a major factor in predicting future violent behavior. Several peer-reviewed, scholarly studies show nearly one third of gun violence is directly linked to interpersonal relationships. That could be an employee who is angry at their boss, a man who is mad at his cheating wife, or a male teen who is rejected by a girl. Researchers explained it is important people see the difference between violent behavior, and those diagnosed with clinical mental conditions. Linking acts of violence to mental illness has been found to increase the stigma of mental illness, and prevents people with a mental illness from seeking treatment.

Source: University of Texas, UC Davis, Gallup Poll

Red Flag Laws, Extreme Risk Protection Order and Gun Violence Restraining Orders

New laws are in place in 17 states, including California, to restrict gun access to people who pose a threat to themselves or others. Gun Violence Restraining Orders allow members of law enforcement or family members to ask a judge to prevent someone from having or buying a gun. They're largely known as ‘red flag' laws aimed at preventing gun violence.

California's law was prompted after a college student from Santa Barbara went on a shooting and stabbing spree in 2014. Family members saw the warning signs but couldn't legally do anything.

California passed the ‘red flag' law in 2016. The most recent data shows that over three years since the law was implemented, more than 400 gun violence restraining orders were issued when warning signs were seen. Researchers say it has already proven successful and prevented mass shooting plots and suicides. The NRA is against these laws claiming it hinders the right of due process.

Source: The Trace , California courts, NRA

What is the Second Amendment and can it be challenged?

From 1791 to 2008 -- about 200 years -- the meaning of the Second Amendment was clear and mostly undisputed, despite the gnarled syntax of the text itself: "A well regulated Militia, being necessary to the security of a free State, the right of the people to keep and bear Arms, shall not be infringed." Generations of Supreme Court and academic opinion held that the amendment did not confer on individuals a right "to keep and bear Arms" but, rather, referred only to the privileges belonging to state militias, writes Jeffrey Toobin in New Yorker Magazine.

Toobin said that beginning in the 1970s, the NRA began an effort to change the public, and judicial, understanding of the amendment, and began working on a state-by-state approach. Embracing and passing gun-rights legislation in the states, "fostered a legal culture in which the right to bear arms enjoyed a privileged place," author David Cole wrote in his book "Engines of Liberty."

At the same time, the NRA was sponsoring academic research that purported to show that the traditional understanding of the Second Amendment was incorrect.

Then the tipping point: In 2008, the Supreme Court decided the District of Columbia v Heller, 5-4 , overturning a handgun ban in the city. Justice Antonin Scalia wrote the opinion in narrow but unprecedented terms: For the first time in the country's history, the court explicitly affirmed an individual's right to keep a weapon at home for self-defense.

Gun control activists maintain that Scalia wrote a narrow opinion with several exceptions, such as bans on "unusual and dangerous weapons" and sales to domestic abusers and people with mental illness. He also wrote that states and cities could ban firearms from places like government buildings.

And there are challenges to the periphery of the Second Amendment currently being litigated.

Next term, the Supreme Court is set to hear concerns of a provision of a New York City gun law that regulates where licensed handgun owners can take their firearms. The law blocks licensed gun owners from removing a handgun from the address listed on the license except to travel to nearby authorized small arms ranges or shooting clubs. The challenge comes from the New York State Rifle & Pistol Association, whose lawyers argue that New Yorkers cannot transport their handgun to their "second home for the core constitutional purpose of self-defense or to an upstate county to participate in a shooting competition, or even across the bridge to a neighboring city for target practice."

In California, a federal judge last month upheld the state's ban on owning, manufacturing or selling semi-automatic rifles and the "bullet buttons" that convert a conventional rifle into a rapid-fire weapon. Semi-automatic rifles are "incredibly effective killing machines" that are not commonly used or necessary for self-defense, said U.S. District Judge Josephine Staton of Santa Ana. She rejected a challenge to the law by the California Rifle & Pistol Association, and her ruling contrasted sharply with decisions in 2017 and 2018 by a federal judge in San Diego, who said the state's ban on high-capacity gun magazines violated the right of law-abiding citizens to defend themselves.

A brief history of gun legislation in the United States

Federal gun laws that passed -- and those that didn't:

Brady Bill (1993, House and Senate): Enacted into law. Refers to the Brady Handgun Violence Prevention Act. Passed in 1993, the Brady bill established five-day waiting periods and required background checks for gun purchases.

Assault Weapons Ban (1994, House and Senate): Enacted into law, expired in 2004. This law banned people from making, selling or owning certain types of semiautomatic weapons.

Closing Gun Show Loophole (1999, House and Senate): Did not become law. This refers to separate measures in each chamber that would have (broadly speaking) required people purchasing guns at gun shows to undergo a background check and a three-day waiting period.

Protection of Lawful Commerce in Arms Act (2005, House and Senate): Enacted into law. This measure protects firearm manufacturers from being sued for crimes committed with the firearms they manufactured.

Concealed Carry Reciprocity (2011 and 2017, House; 2013, Senate): Did not become law. These bills would have allowed a person with a concealed-carry permit in one state to legally carry a concealed firearm in other states.

Manchin-Toomey Bill (2015, Senate): Did not become law. This bill would have required background checks for the purchase of guns at gun shows and online.

Murphy Amendment (2016, Senate): Did not become law. This measure would have expanded background checks to cover guns sold online and at gun shows.

Feinstein Amendment (2016, Senate): Did not become law. This measure would have barred people on terrorist watch lists from buying firearms.

Mental Health (2017, House and Senate): Enacted into law. This bill undid an Obama-era regulation that added some people with mental illnesses to the FBI's background check database.

Background check (February 2019): The House of Representatives passed HR 8, which would prohibit most person-to-person firearm transfers unless a background check can be conducted, aiming to close a potential loophole allowing the transfer of firearms without a background check at gun shows or between individuals. The Senate has not taken any action on the bill since the House passed it.

Background check (February 2019): HR 1112 would extend to at least 10 days the amount of time firearms dealers must wait for a response from the background check system before the sale can proceed. Currently, they can make the sale if they haven't received a response in three days. The Senate has taken no action on the bill since it passed.

Source: NPR , KTVU reporting

Resources and Source Material

California Gun Laws

CA gun laws overview

CA guns frequently asked questions

CA Firearm Safety Certification Study Guide

CA Gun Violence Restraining Order

CA Gun Violence Restraining Orders general info

CA ATF Firearm Tracing System

Federal Gun Laws

Contact Your U.S. Senator

Contact Your U.S. Representative

NPR: How Have Your Members of Congress Voted

Red Flag Laws: Where the Bills Stand in Each State

Associated Press: Red Flag bill gains support

Brady Law

1994 Crime Bill Transcript

1994 Crime Bill Fact Check

The Second Amendment transcript

The Second Amendment: History and Supreme Court Interpretations

Google Trends: Second Amendment

Resources

Mass Shooting Tracker

FBI Active Shooter Resources

California DOJ Dealer Record of Gun Sale Transactions

What are bump stocks?

What is the difference between semi-automatic and automatic?

Research

UC Davis: Violence Prevention Research Program

UC Davis: Firearm ownership in CA

Research on Violence Arnold Ventures

Violence Policy Center: Why assault weapons are so deadly

Mental Health Myths and Facts

Heath Affairs: Trend in Media Coverage of Mental Health

The temporal associations between gun violence and mental health

History of Federal Funding Freeze

Polls and Opinion:

Washington Post Poll: Mental Health and Guns

Gallup Poll: Guide to U.S. Opinion on Guns

Gallup Poll: Americans Fault Mental Health System Most for Gun Violence

NRA Opposes California's Red Flag Law

NRA Blog: AR-15 is Most Popular Rifle

Contributors: Lisa Fernandez, Anna Trinidad, Simone Aponte, Amber Eikel, Michelle Toy, Candice Nguyen, Brooks Jarosz, Chandler Landon and Tony Hodrick.