Gun stocks have plunged since the election of Donald Trump.

What happened? Trump was endorsed by the National Rifle Association and was the clear favorite of white, rural, gun-loving America.

But the stock prices for Sturm, Ruger (RGR) and Smith & Wesson (SWHC) have both dropped by more than 20% since Trump won.

The problem is that gun lovers are losing their biggest boogeyman: Hillary Clinton, who would have continued President Barack Obama's pursuit of gun control legislation.

She was so reviled by the industry that Ruger CEO Michael Fifer described her in August as "actively campaigning against the lawful commerce in arms." At the same time, his company reported a 19% spike in quarterly sales, fueled by fear of Clinton.

The same thing has happened regularly after mass shootings during the Obama administration. People rush to buy guns, fearing tighter gun control measures. Gun company stocks go higher, too.

Before the election, "there was a widespread expectation that Hillary would win and some gun retailers began to stock up, expecting strong demand surge from the prospect of tightening gun control under a Hillary Clinton administration," said Rommel Dionisio, a gun industry analyst for Wunderlich Securites.

"Obviously, that's not going to happen," he said. Now that Trump will be president and Republicans will control both houses of Congress, he said demand for guns will probably drop over the next year or two.

Related: Ruger CEO says Clinton was 'actively campaigning' against gun industry

Larry Keane, senior vice president and general counsel of the National Shooting Sports Foundation, a gun industry group, said "our industry will continue to grow" but in a "more normalized market with a more stable political environment."

He said the industry will experience "fewer spikes in demand that occur when the law abiding consumer perceives that anti-gun politicians will enact restrictions on their ability to purchase the products they want to buy."

Background checks conducted by the FBI, which roughly rise and fall with gun sales, surged after the mass shootings at a Newtown, Connecticut, elementary school in 2012, an office in San Bernardino, California, in 2015, and the Pulse nightclub in Orlando, Florida, this year.

AR-15s were used in all those shootings, so people rushed to buy the military-style semiautomatic rifles, fearing a return of the so-called assault weapons ban, which expired in 2004.

High-capacity magazines are also favored by mass shooters, so people rushed to buy those, too. They were also restricted under the expired ban.

One of the biggest surges in FBI background checks occurred after the Newtown shooting, when Obama proposed restricting assault weapons and expanding background checks. When the bill died in Congress, background checks dropped, temporarily.

Related: Smith & Wesson is changing its name

The pattern appears to be repeating itself now that Clinton has been defeated.

It's a tradeoff for gun manufacturers -- a decreased threat of gun control laws comes with lower sales. Marty Daniel, CEO and co-founder of Daniel Defense, a manufacturer that specializes in AR-15s, discussed it with CNNMoney at the NRA annual meeting in May.

"If Hillary's elected, we'll have the best four years that we could ever have, but I would not trade that for what's best for our country for anything in this world," he said.