In my 16 years serving in Congress, there were 52 mass gun shootings in America, including 16 deaths in San Bernardino, 9 at a church in Charleston, S.C., 50 at the Pulse nightclub in Orlando, Fla., and 28 at an elementary school in Connecticut. In each case, members of Congress had the flag lowered over the Capitol building, held moments of silence on the House floor, and tweeted our thoughts and prayers.

Here’s what we never did: pass legislation to reduce mass shootings.

To see the abysmal failure of Congress to protect the lives of its constituents on full display, attend the annual “markups” of the House Appropriations Committee (on which I served) as it debates funding levels for federal departments and agencies. It’s a depressing ritual of Democrats trying to pass gun safety amendments, and most Republicans shooting down those efforts.

Following the 2016 shooting in Orlando, we offered an amendment called “no fly, no buy,” which would prevent those who appear on the federal terror watch list from being able to purchase a weapon of war. It was defeated.

We tried to expand background checks. Also defeated.

We even sought to repeal the “Dickey Amendment,” which prevents the Centers for Disease Control and Prevention from researching the correlation between gun violence and public health, and was eventually opposed by its own author, former Rep. Jay Dickey, R-Ark. It failed.

Afterward, in the privacy of the members-only elevator, some moderate Republicans confessed that they would have supported these measures, if only it didn’t put at risk their re-election. Risk of being shot at in an elementary school classroom was tolerable. Risk of losing a primary election was not.

People often ask me, “When will Congress do something” to reduce gun violence in America. My answer is, “When you do.”

Many people believe that the lack of progress on guns is because of some Machiavellian strategy to pry out concessions on other issues. Others believe that it’s the fundraising might of the National Rifle Association (according to Politifact, between 1998 and 2016, the NRA gave $13 million to “candidates, parties and leadership political action committees,” not an overwhelming level relative to other lobbying groups). It may be some of those things, but the more powerful and motivating force that has prevented any kind of actual movement on gun violence is simply what political operatives call “voter intensity.”

“Gun voters” are better organized, more cohesive and more dedicated to one single issue than many other voters, who cast votes on a multitude of issues.

Shortly after I was sworn into Congress in 2001, I wanted to introduce legislation to require safety locks on certain guns. I approached another freshman, a Democrat from Arkansas, to support the bill. He refused adamantly, noting that in his rural district, schools were closed on the first day of hunting season. I joked that in my suburban district on Long Island, schools were closed when there was a big sale at the mall.

Years later, that same colleague told me that in the depths of the recession, which hit his district hard, he visited long lines of constituents applying for unemployment and other benefits. The concern he heard the most wasn’t about accountability by the financial institutions that plunged us into an economic spiral or even getting things back on track. It was this: “Don’t let those Democrats take our guns away.”

With a largely gerrymandered landscape that’s rendered all but a few dozen districts as either far left or far right, House Republicans believe that more moderate voters will forgive them for opposing, say, stronger gun background checks, as long as they’re with them on other issues: women’s reproductive rights, climate protections, trade. But that “I’m NRA & I Vote” bumper sticker that you occasionally see is quite literal. It sends this message to incumbents: In Congress, vote anyway you want on war and peace, taxes, trade, tariffs, terrorism. But support stronger background checks, and you’ve lost my vote.

The upcoming midterm election may be the turning point. It offers about 10 highly competitive House districts on the verge of replacing a gun lobby lapdog with someone who’ll support commonsense safety measures. The students of Marjory Stoneman Douglas High School in Parkland, Fla., are traveling through many such districts. They’re registering voters, but more importantly, they’re reminding them not to forgive a member of Congress who votes to protect the gun lobby but is “OK” on other issues. Indeed, what other issue is there beside keeping your children safe from gunfire in their classroom?

Only when your voting intensity on gun safety matches or exceeds that of gun voters will members of Congress take notice.

Former U.S. Rep. Steve Israel, D-.N.Y., the author of “Big Guns: A Novel,” will speak on“Guns, Politics, and the Future of the Democrats,” in conversation with former U.S. Under-Secretary of State for Arms Control Ellen Tauscher, 6:30 p.m., Thursday, at the Commonwealth Club, 110 Embarcadero, San Francisco. Tickets are $30 (non-members); $20 (members) and $10 (students). For information:

www.commonwealthclub.org