This was evident in the full-throated defense of gun rights at the N.R.A.’s annual convention this past weekend. Still, as polls have shown growing support for a wide range of restrictions, there has been a corresponding shift in the focus of the arguments against those restrictions.

For instance, the N.R.A. and some other groups say that on principle, they don’t oppose red-flag laws, which allow the removal of firearms from people judged to pose an imminent threat. The problem, they argue, is a lack of due process protections in individual proposals. This has caused a growing rift between the N.R.A. and smaller groups to its right that advertise themselves as uncompromising.

In April 2013, as public attention faded, the families and organizations that had sprung up around gun issues changed their strategy. What started as a legislative campaign became an effort to build infrastructure for future fights.

The N.R.A. had spent decades doing exactly that. Long before Sandy Hook, before Columbine, it was working tirelessly to accumulate influence in Washington.

There was some organizing on the other side: The group now called the Brady Campaign to Prevent Gun Violence was instrumental in passing the 1993 Brady Law, which instituted federal background checks, and the 1994 Assault Weapons Ban, which prohibited some semiautomatic weapons. (The ban expired in 2004.) But Brady’s influence was dwarfed by the N.R.A.’s single-issue voters, millions of dollars in political spending and preternatural ability to mobilize.

That power imbalance changed because of Sandy Hook.

The shooting itself instantly spawned new organizations. Within hours, Shannon Watts, a mother of five in Indiana, went looking for a gun-related equivalent to Mothers Against Drunk Driving and found none. So she created a Facebook page, which ballooned into Moms Demand Action.