Not long after police killed the husband-and-wife assailants responsible for the mass shooting in San Bernardino, California, details began trickling out about how they had managed to kill 14 people and wound 22 others in less than four minutes. The attack had been carried out with two AR-15 rifles outfitted with high-capacity magazines and a feature called a “bullet button.” California bans AR-15s with magazines that can’t be removed without the aid of a tool, in order to prevent users from reloading quickly and inflicting mass damage. Bullet buttons are used to quickly release exhausted magazines from semiautomatic rifles while keeping them just within the bounds of the law.

The bullet button is recessed in a small hole on an AR-15’s lower receiver, next to the magazine well, and can be engaged only with some kind of tool, such as the tip of a bullet. The buttons are sold as an aftermarket accessory or incorporated directly into weapons manufactured for the California market. The appeal of the buttons is that they allow California rifle owners to blow through ammunition at a much higher rate than if they were using standard “California-compliant” rifles, which can only be reloaded one round at a time by opening the receiver, as if for cleaning.

The fact that bullet buttons allowed the San Bernardino shooters to inflict so much damage in such a short period of time underscores how California’s assault weapons law is essentially “meaningless,” according to Jay Wachtel, a former agent with Bureau of Alcohol, Tobacco, Firearms and Explosives. With a bullet button, he told The Trace, it’s easy to work around regulations meant to limit the killing power of a semiautomatic rifle like the AR-15.

Invented by a San Diego-area firearms dealer named Darin Prince in 2006, the bullet button has been the subject of much scrutiny. Prince says he’s spent “several hundred thousand dollars” in legal battles against the state’s Department of Justice and fending off politicians who claim the buttons exploit a loophole in the assault weapons law.

“It’s not a loophole in any shape or form,” said Prince, who added that he created the device to make life easier for California rifle owners.

Today, the buttons come standard on rifles produced for California by big gun manufacturers like Colt, Bushmaster, and Smith & Wesson.

California lawmakers tried to banish rifles like the ones used in the San Bernardino shooting more than 25 years ago. In 1989, Governor George Deukmejian, a Republican, signed the Roberti-Roos Assault Weapons Control Act, which banned the sale or transfer of a list of weapons, including the Colt AR 15, the TEC-9, and the Uzi, among others. The measure gained support after a schoolyard shooting in Stockton in January 1989, in which a gunman killed five children and wounded 32 others with a semiautomatic AK-style rifle.

Almost as soon as the assault weapons law went into effect, the spirit, if not the letter, of the law was undermined. Because it banned weapons by specific make and model, all that was needed to get around the law were slight cosmetic or name changes. For instance, the bill banned the Colt AR-15, the original civilian version of the M16, the military’s standard issue rifle, but not the infamous Colt Sporter, a model whose only significant difference from the AR-15 was its name. These copycats proliferated through the 1990s as legal opposition from Colt and other companies hampered enforcement. (The 1994 national assault weapons ban faced similar problems, but it did manage to constrict the market for semiautomatic rifles.)

“You’ve got this great gun, it fires an incredibly lethal cartridge, but your friends in every state except for California can easily change out the magazine,” an ATF agent says of the state’s assault weapons law. “Part of the fun of these guns is the ability to quickly reload.”

In response, California first expanded the list of prohibited firearms, and then amended the law in 1999 to ban weapons based on generic characteristics, rather than make and model. Those characteristics included pistol grips and folding stocks, and the ability to detach a magazine by hand. Wachtel, who worked in the ATF’s Long Beach office during the 1990s and now lectures at California State University, Fullerton, is against outlawing features like pistol grips and folding stocks, as they don’t necessarily increase the lethality of the weapon. But he does applaud the ban on easily removable magazines.

“The only thing California did to slow anything down was the fixed magazine requirement,” he said.

California maintained its law even as President George W. Bush allowed the national assault weapons ban to expire in 2004. Soon after, the semiautomatic rifle market boomed, and the AR-15 became one of the most popular guns in the country among consumers. The gap between California and its more gun-friendly neighbors became intolerable to some Golden State firearms enthusiasts. On the day the federal ban lapsed, the Palm Springs Star reached an employee at a Desert Hot Springs gun shop, who told the paper, “The phone has been ringing off the hook all day … They all want to buy [assault weapons] but they can’t.”

Some companies’ attempts to accommodate the demand in California for ARs — like a Bushmaster rifle with a magazine permanently welded in place — were, to some fans, almost worse than no ARs at all.

“You’ve got this great gun, it fires an incredibly lethal cartridge, but your friends in every state except for California can easily change out the magazine,” Wachtel said. “It just pisses people off. Part of the fun of these guns is the ability to quickly reload.”

It was around this time that Prince saw an opportunity. As the owner of a gun store, he was well aware that many of his customers wanted guns like the AR-15, but couldn’t easily buy them in the state. In 2005, he invented the Prince50 magazine lock, which a gun owner could install on an AR-15 to lock its magazine in place without permanent welding, thereby complying with California statutes. With the Prince50, a gun owner could buy a typical AR 15 out of state, add the lock, and then transfer it back to California.

But it was the bullet button, invented the next year, that put Prince on the map. He explained the device’s genesis: “I looked carefully at the definition of detachable magazine. It excluded those that use a tool to remove the magazine.” A bullet could be a tool that every gun owner will have handy, he realized; then he engineered a way of detaching a magazine with a small, pointy implement. The bullet button not only allowed out-of-state AR 15s to come into line with California law, but it also gave users some approximation of the quick lock-and-load, burn-through-magazines shooting experience that has shaped American gun culture since 2004.

The bullet button also raised concerns among California law enforcement officials.

“The kneejerk reaction of the [California] Department of Justice was that it was illegal. But they couldn’t back it up,” Prince recalled.

In 2012, a DOJ spokesperson gave contradictory accounts to a San Francisco CBS affiliate, first telling reporters that rifles assembled with the buttons were illegal in the state, only to say moments later that the buttons were, in fact, legal. (The California Department of Justice declined to comment on Prince’s case specifically, but said bullet buttons are evaluated on “a number of factors.”)

That same year, State Senator Leeland Yee, a Democrat, introduced legislation to outlaw the bullet button.

“These conversions are circumventing the spirit of California’s assault weapon statute,” he said at the time.

Yee’s bill was met with vociferous opposition — including one credible assasination threat — and it died in the Senate. (In 2014, Yee was arrested after offering to help an undercover FBI agent get hold of $2.5 million worth of illegal weapons, including shoulder-launched missiles. He plead guilty to racketeering charges this past July.)

On January 16 of this year, California’s attorney general, Kamala Harris, and Assembly member David Chiu introduced a bill that would reclassify guns whose magazines that can be detached with a tool — bullet button guns — as assault rifles, subjecting them to the same registration requirements and restrict sale of new models.

U.S. Senator Dianne Feinstein, a California Democrat, has since led the crusade against bullet buttons, including a ban on the devices in a recent proposal to resurrect the federal assault weapons ban. But the U.S. Senate has not proved amenable to any new regulations on guns. In any case, no other state has to wrestle with inventions like Prince’s — they exist solely because the language in the California law allows for magazines that can be released with a tool; the law doesn’t require the magazine to be permanently attached.

Robert Spitzer, a law professor at SUNY-Cortland, points out that New York’s assault weapons ban doesn’t permit such devices.

“The critical part of the New York law is that the magazine has to be permanently in place,” he said.

In recent years, the bullet button’s popularity has given rise to a new class of accessories that make the feature even closer to a true push-button. One designer makes a ring with a small spike just for pressing the button. On California gun-discussion boards, users post guides to making a glove with a similar plastic spike protruding from a finger.

Most controversial is the Mag Magnet, made by another San Diego-based company. It’s a button with a magnet that can be held directly in place atop the recessed magazine release, so the user can quickly remove the magazine by hand. Though it’s legal to purchase a Mag Magnet in California, owners can’t use one on a rifle in the state.

“If you leave the magnet on the bullet button,” Prince said, “you’ve illegally modified the gun.”