LOS ANGELES (AP) — Just months after his 18th birthday, Nikolas Cruz went to a Florida gun store to buy a weapon. But there were limits on what he could purchase at his age.

Cruz wasn’t old enough to buy any of the handguns at the store. But there’s no such restriction for rifles, shotguns or the AR-15 that police say he used to carry out the nation’s deadliest school shooting in more than five years.

The young age of the man accused in the Florida high school shooting that killed 17 people has revived the debate over age requirements for gun purchases in a country where a patchwork of laws and rural states steeped in hunting culture allow kids as young as 14 to buy rifles.

In most states, it’s easier for teenagers to buy rifles than handguns.

In Florida, where the legal drinking age is 21, Cruz could buy a weapon used for mass destruction but not sip a beer for personal consumption.

Federal law requires someone to be at least 21 to buy a handgun from a licensed dealer, but only 18 in most places to buy a long gun. In some states — mostly rural places with a strong tradition of hunting — you can buy a rifle at the age of 14 or 16.

Gun-rights advocates call the long gun an integral part of American culture, allowing kids and their parents to bond while out in the woods hunting and providing a way to teach youngsters firearms safety.

Gun-control advocates counter the laws are outdated and fail to recognize the toll that modern, militaristic-style long guns have played in killing scores of innocent men, women and children. They say such rifles should not be in the same category as a bolt-action rifle that a young hunter uses to shoot a deer and vow to add this to the list of restrictions they are pushing for despite having little momentum in Congress to do so.

“It used to be the case that long guns were hunting guns. They were bolt-action shotguns and single-shot rifles and things really people bought for hunting or sport shooting and weren’t the kind of (AR-style rifles) that are used in mass shootings,” said Robyn Thomas, executive director of the Giffords Law Center to Prevent Gun Violence.

An estimated 8 million AR-style guns have been sold since they were first introduced to the public in the 1960s, and about half of them are owned by current or former members of the military or law enforcement, according to the National Shooting Sports Foundation.

On average, more than 13,000 people are killed each year in the United States by guns, and most of those incidents involve handguns while a tiny fraction involve an AR-style firearm. Still, the AR plays an oversized role in many of the most high-profile shootings, including the nightclub shooting in Orlando and the deadliest mass shooting in modern U.S. history: the attack by a gunman holed up in a Las Vegas hotel that left 58 dead and hundreds injured.

States including Maine, Minnesota and Vermont allow teens 14 or 16 years old to buy or purchase long guns without parental consent, with some exceptions. Only two states — Hawaii and Illinois — have imposed stiffer age restrictions, requiring someone to be at least 21 before they can purchase a long gun.

The disparity in age requirements between handguns and long guns exists largely because of the popularity of hunting in the U.S. Hunting deer, ducks, geese, varmints and various other animals is a way of life for youth in many states, and the laws are generally written to accommodate purchases of rifles and handguns for teenagers.

The younger age for long guns dates back to the 1880s. While handguns have long been tied to crime, long guns have been part of the fabric of American life — from hunting and target shooting to gun clubs in the Boy Scouts and some schools.

Florida is a large and diverse state. Despite the buzz and glitz of some of its largest cities like Miami and Orlando, large sections of the state remain rural, conservative and gun-friendly. Republicans have held strong majorities in both legislative chambers for the past two decades and have moved more often to expand gun rights than restrict them — leading some gun-control advocates to call the Sunshine State the Gunshine State.

The man designated to be Florida’s next House Speaker, Republican Rep. Jose Oliva, indicated hours after the school shooting that he wouldn’t be in favor of gun restrictions.

“You don’t take cars off the road because someone got drunk, used one and killed someone. You don’t take a car off the road because someone rented a U-Haul and ran it into some people in New York City,” Oliva said.

Florida is a state where one of the leading Republican candidates for governor, Agriculture Commissioner Adam Putnam, proudly agreed when a newspaper editorial called him a sellout to the National Rifle Association.

Gun-control advocates and even some police officials are holding out hope — albeit a longshot given current political realities — that there will be some movement to change age requirements.

“An 18-year-old with an AK-47 and an AR-15 is completely unreasonable,” said Frank Fernandez, director of public safety in Coral Gables, Florida, and the chairman of the International Association of Chiefs of Police’s firearms committee. “That is a weapon that is meant for destruction. It’s not a weapon that you can use to go hunting. That is a weapon … used in the theater of war.”

(@Copyright 2018. The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)