In state capitals and city halls nationwide, the National Rifle Association is demonstrating its enduring ability to thwart new firearms regulations and expand rights for gun owners — even after a school massacre in Newtown, Conn., gave the gun-control cause new momentum.

Just last week, Illinois state House members declined to consider proposed limits on assault weapons amid a surge of negative phone calls and e-mails from NRA members and other gun owners. In Wisconsin last week, legislators wary of provoking the NRA backed off a proposed ban on loaded firearms in the public gallery overlooking the state assembly chamber. In suburban Los Angeles, Glendale City Council members anticipate a packed and emotional meeting next week as a result of NRA-issued “grass-roots alerts” protesting proposed limits on gun shows. And legislators in at least seven states are weighing whether to allow public school staff members to carry weapons to work, as the NRA has urged.

The local and state-level skirmishes underscore the obstacles that await President Obama and congressional Democrats as they prepare to push new gun-control measures in the face of stiff opposition from the NRA and its Capitol Hill allies — many of whom represent areas where gun ownership is a cherished value.

Gun rights advocates suffered a setback in the immediate aftermath of the Newtown shootings when Michigan Gov. Rick Snyder, a Republican, vetoed a bill that would have allowed concealed weapons in schools, day-care centers and other public places. Another defeat came this week, when New York’s Democratic governor, Andrew Cuomo, and legislature approved new bans on assault weapons and high-capacity ammunition clips. It was only by moving with extraordinary speed that the state prevented the NRA from mounting its typically muscular opposition.

The group and its allies, confident in their traditional ability to block congressional action, consider state capitals the prime battlegrounds and are planning to shore up their influence in states where they may be vulnerable, such as Maryland and other Democratic-led states.

As legislators, local officials and advocates on both sides of the issue can attest, the NRA has a political arsenal that can outmatch even the most powerful interest groups — chambers of commerce, medical associations and police federations.

Many lawmakers naturally embrace and applaud the NRA’s aggressive defense of gun rights. Even legislative opponents speak in admiring terms of the group’s organizational skills, saying they have been forced to compromise or give up on gun-control initiatives rather than engage the NRA.

Obama acknowledged the importance of the NRA’s base as he presented his proposals Wednesday, saying that success in Congress would require support from “voices in those areas and those congressional districts where the tradition of gun ownership is strong.”

The NRA and its vast network of local affiliates achieve their success through a mix of skilled local lobbying and voter mobilization. Annual report cards rate legislators on an A-F scale based on voting records, and the group sends millions of blaze-orange postcards during campaigns to tout its friends or attack its enemies. As a reward to those with high grades, the NRA provides endorsements and campaign support. It also offers friendly lawmakers access to legal counsel and legislative research.

The organization, which has an annual budget of more than $200 million, directs campaign donations to its supporters in both parties, with contributions to federal campaigns totaling about $20 million in 2012, according to the Center for Responsive Politics. Comprehensive figures for state campaigns were not available.

But NRA officials and lawmakers on both sides say the group’s power stems mostly from its ability to activate its passionate membership.

With an e-mail alert system designed to target its 4.2 million members, the NRA can mobilize hundreds of gun owners in every community on short notice to turn out at a committee hearing or a city council meeting.

“What they do well is they really get people out,” said Illinois state Rep. Elaine Nekritz, a Democrat who heads the House committee that was to consider the assault-weapons ban until gun owners, spurred by the local NRA affiliate, overwhelmed legislators with calls and e-mails. “That’s democracy. I can’t fault them for it. I have to applaud them for it.”

Nekritz, who supports the proposed ban, said her office was inundated with calls and emails in the two days before she pulled the bill. “I didn’t see anything that was supportive,” she said.

The response resulted in part from work done by the NRA’s local affiliate, which e-mailed its 20,000 members and contacted other gun owners statewide.

“Our base is passionate, and it’s big,” said Richard Pearson , executive director of the group. “The NRA is so powerful because millions of people in the United States think the NRA is doing the right thing.”

The post-Newtown efforts by gun rights activists follow two decades of success in transforming the policy and political landscape from the ground up. With the debate largely at a stand-off in Washington over the past 20 years, state after state has expanded gun owners’ rights, rolling back restrictions and, in many places, allowing people to bring guns onto college campuses, school grounds and the property owned by their employers.

Before 1987, when Florida approved a landmark law saying that anyone who can legally own a weapon shall be issued a license to carry it, 31 states prohibited or sharply restricted residents from carrying guns, according to an NRA report. The Florida law became a model that was widely adopted after state-level lobbying by the NRA.