Gun sales are surging in California, as buyers stock up before six new gun-control measures signed by Governor Jerry Brown take effect in 2017.

Lawmakers in California passed tighter gun-control measures following a terrorist attack at a San Bernardino holiday party last year, which left 14 people dead and 22 injured.

As of December 9, nearly one million firearms had been purchased in the state this year, compared to roughly 700,000 sold in 2015. It is expected that that number will far surpass the one million mark, as last-minute buyers search for weapons with features that will be banned beginning on the first of the year.

Semiautomatic rifles have specifically boomed in popularity, with sales more than doubling in 2016, over the previous year. In 2015, 153,931 of the rifles were reportedly sold. This year, however, as of December 9, at least 364,643 had been purchased.

“Compared to a normal year, sales are up one thousand percent, it’s ridiculous,” California firearms dealer Gabe Vaughn told the Press Democrat. “Pretty much the second we got them they were gone. A lot of them were pre-sold before they arrived to the store.”

According to Vaughn, his shop the Sportsman’s Arms in Petaluma sold 60 semiautomatic rifles on December 21 alone.

The new gun-control measures taking effect in 2017 include reclassifying semiautomatic rifles that have certain features, including flash suppressors and bullet buttons for the quick ammunition magazine swap, as assault weapons. Assault weapons have been banned in the state since 1989.

The new regulations have driven sales of weapons with the soon-to-be-banned features up 40 percent this year.

According to the new laws, residents will be able to register their assault weapons for $15, but the permit will be non-transferrable, meaning they cannot be sold or gifted later, unless the transferee re-registers the weapon. If a person decides they no longer want the weapon, or if the owner dies, the weapon must be destroyed.

There are ways to modify guns to get around the new regulations, including disabling the bullet button.