Shootings in an elementary school, movie theaters and a church weren’t enough. Nor was an assassination attempt on a lawmaker. But the massacre at the Pulse nightclub in Orlando, followed by Republican Donald Trump’s calls for new firearms restrictions, have convinced Democrats that they can run and win on the issue of gun control this year.

One reason is Orlando’s distinction as the site of the worst mass shooting in U.S. history, a fact that has pushed advocates for greater gun restrictions to new levels of outrage. Another is the continuing shift of public opinion across the United States in favor of new laws. And the unusual role that Trump, the presumptive GOP presidential nominee, has played in the discussion, bucking his own party by pushing for restrictions and putting some fellow Republicans in a sticky position with their constituents back home.

All of it has prompted Democratic lawmakers to conclude that, even with little hope for legislative action this year, an election looms this fall that could change all.

“We’ve gotten to the point where it was becoming difficult and it was becoming painful to do moments of silence; many of us felt disingenuous doing a moment of silence knowing that was it,” Rep. Xavier Becerra (D-Calif.), chairman of the House Democratic Caucus, said Thursday. “Frustration boiled over.”

That frustration quickly led Democrats to force a legislative showdown this week. They used procedural tactics to upend House and Senate schedules, pushing Republican leaders to engage on an issue they had considered to be long settled.

Here are the key moments you missed from the marathon gun vote protest Democrats staged on the House floor. The sit-in stretched from June 22 into the morning hours of June 23. (Jenny Starrs/The Washington Post)

Trump helped, perhaps unwittingly, in that cause. Although he later backed away from his support for new laws restricting gun sales to terrorism suspects, his initial statement gave Democrats an opening, surprised moderate Republicans and triggered bipartisan talks in the Senate.

Those talks ended in defeat Thursday, but this week’s votes, as well as the Democratic “sit-in” in the House chamber that ended that day, captured the country’s attention in ways the caucus has struggled to do in recent years. And all of it prompted a flurry of preparations to take the issue to voters this fall.

“After Sandy Hook, the country needed to mourn,” said Erica Lafferty Smegielski, the daughter of the principal killed in the Newtown, Conn., school massacre in December 2012. “It was the same after Aurora, Columbine, Virginia Tech. But they’ve just become so frequent that everyone is just — we’re done. The American people are done. The Democratic leaders are done. This week was absolutely historic. . . . Our leaders are finally taking action.”

A ‘stunt’ — or smart politics?

Aides in the campaign arms of House and Senate Democrats said this week that gun control will loom large in dozens of competitive races.

The issue is expected to be a subject of attacks on Republican candidates in at least two House seats in Upstate New York, five swing districts in Florida and districts in rural states such as Colorado, Iowa and Kansas, according to Democratic aides. In the Senate, where Republicans are defending 24 seats, Democrats expect that gun-control-themed messages will resonate with swing voters in Florida, New Hampshire, Ohio and Pennsylvania.

Republicans, led this week by House Speaker Paul D. Ryan (Wis.), criticized Democrats for their “political stunt” and admonished them for sending fundraising appeals in the midst of their sit-in.

“If this is not a political stunt, then why are they trying to raise money off of this? Off of a tragedy?” he asked reporters at a news conference Thursday.

House Speaker Paul Ryan (R-Wis.) gaveled the House into session just after 10 p.m. on June 22, after a daylong sit-in by Democratic members, but it was far from orderly. (C-SPAN)

But public opinion shows that Democrats may have an opening. An overwhelming majority of Americans support expanding background checks and restricting access to military-style weapons. And more than 8 in 10 Americans support preventing people on government terrorism watch lists or no-fly lists from owning a firearm, according to a CNN poll released this month.

Such numbers have attracted plenty of attention in the wake of the Orlando massacre, as the nation absorbed the fact that gunman Omar Mateen had previously been under FBI investigation for possible ties to terrorism.

One of the main divisions between Republicans and Democrats on Capitol Hill this week was over how to block terror suspects from buying guns. Representatives of gun-control groups say that public opinion gives them a chance to erase that division by helping Democrats retake both the House and Senate.

Even before Orlando, gun control had already assumed an outsize role in the 2016 election. Hillary Clinton, the presumed Democratic presidential nominee, has displayed an eagerness to go toe-to-toe on the issue and has brought a level of specificity and urgency to her promises unseen in recent presidential election cycles.

Clinton, who spoke little about gun control during her 2008 presidential campaign, hammered her Democratic opponent, Sen. Bernie Sanders of Vermont, for favoring a 2005 law shielding gun manufacturers from liability for the misuse of firearms — and for voting against the 1993 Brady Bill that required federal background checks for gun purchases and mandated a waiting period for those sales.

In the first Democratic debate, when asked whether Sanders was tough enough on guns, Clinton quickly responded, “No, not at all.”

“It’s time the entire country stood up against the NRA,” she said. “The majority of our country supports background checks, and even the majority of gun owners do.”

Clinton has repeated the same line of attack against Trump. In a speech in May, she said there was political consensus behind her position, while accusing Trump and the National Rifle Association of being out of step with the majority of Americans.

Democrats focused the latest gun debate primarily on ideas with widespread bipartisan support, including the goal of keeping guns out of the hands of terrorism suspects.

In the wake of last year’s deadly shooting in San Bernardino, Calif., Democrats introduced “No Fly, No Buy” legislation. But a bill failed to pass the Senate in December. Two similar plans died again this week in the Senate. When Democrats seized control of the House chamber this week, it was in the hope of holding a vote on the same plan.

Given the need to win over voters in suburban swing districts, it’s a proposal that is likely to figure large in many congressional candidates’ campaign strategies this fall.

“These are very popular policies across the political spectrum, and voters are looking at a Congress unwilling to do anything on it,” said Doug Thornell, a Democratic campaign strategist who advises congressional candidates.

Thornell also noted that, given the increasingly urban and diverse nature of the House Democratic caucus, gun violence is an urgent topic of discussion back home.

“A lot of these members are going home to districts where they have to deal with people who are shot and killed every weekend,” he said. “Their constituents are asking, ‘What are you going to do?’ ”

The ‘third rail’

For years, the power of the NRA seemed so immense that Democrats up and down the ballot avoided the issue of guns, said Brina Milikowsky, chief strategy officer at Everytown for Gun Safety, an organization founded in 2014 by former New York City mayor Michael Bloomberg.

“For a generation, the gun lobby built up a myth of its own power and turned guns into the third rail of politics,” Milikowsky said. Even though a majority of people supported some level of gun control during those years, she said, the political conversation was skewed by the “outsized bully pulpit of the NRA.”

That began to change with the increasing frequency and visibility of mass shootings, said Mark Prentice, a spokesman for Americans for Responsible Solutions, a nonprofit organization and super PAC founded in 2013 by Gabrielle Giffords, the former Democratic lawmaker who was shot in January 2011 at an event in Arizona.

Prentice said the organizational infrastructure to lobby state and federal lawmakers began to fall into place after the killing of 20 schoolchildren at Sandy Hook Elementary School. That infrastructure is now beginning to show results. He noted that it took several months for gun-control measures to earn a vote in Congress after the Newtown shooting, but just days after the Orlando killings.

Prentice and Milikowsky see grass-roots activity as pivotal. Supporters of Americans for Responsible Solutions spent nearly 500 hours on the phone with Senate offices leading up to the votes in that chamber last week, Prentice said, while Milikowsky said Everytown supporters placed more than 169,000 calls to the House in less than 24 hours.

“Our supporters are committed to making 2016 the year of gun safety at the ballot box,” Milikowsky said.

Even the NRA seemed to recognize a new appetite for action on gun control by staking a more restrictive stand than it has in the past on allowing firearms in establishments that serve liquor.

A week after the shootings in Orlando, when Trump was sounding more like an ardent gun rights supporter, he suggested that the violence might have been avoided if patrons had been armed.

“I don’t think we should have firearms where people are drinking,” Wayne LaPierre, the association’s executive vice president, told CBS on “Face the Nation” on Sunday.

Trump later clarified in a tweet: “When I said that if, within the Orlando club, you had some people with guns, I was obviously talking about additional guards or employees.”

Other gun rights advocates predicted that their supporters would participate heavily in an election in which guns are a major issue.

Richard Feldman, president of the Independent Firearm Owners Association and a former NRA lobbyist, said that the Democratic Party’s shift away from rural areas means that “it can write off 100 million gun owners and that its strength doesn’t lie with the gun issue. And it can beat up on those 100 million people and bet that that will work in their benefit. We shall see, but what I know from history is that gun owners care deeply about their firearms and their rights to own them.”

Scott Clement contributed to this report.