WASHINGTON (CNN) As gun violence erupted across the country over the weekend , the nation's foremost gun lobby struggled with one of its biggest crises in decades.

The bitter leadership battle -- centered on the finances and management of the National Rifle Association -- comes as the political landscape on guns undergoes dramatic change: Gun safety groups are growing more powerful and mounting more forceful challenges to the NRA. And public attitudes are shifting amid a grim and growing succession of mass shootings.

On Saturday -- the same day that Oliver North stepped away from the NRA's presidency as part of a power struggle with longtime CEO Wayne LaPierre -- a gunman opened fire in a synagogue outside San Diego, killing one woman and injuring three others. A day later in Baltimore, a gunman fired into a crowd of people gathered for a cookout, killing one and wounding seven.

Experts trace the shift in public perception on guns to the Valentine's Day massacre in 2018 that left 17 students and staff dead at a Parkland, Florida, high school and sparked a youth movement to confront gun violence.

"We're in a political period, especially since the Parkland shooting, where the pro-gun-safety side has new energy, a lot of new money, new organizations and more public support than ever before for their agenda," said Robert Spitzer, a political scientist at the State University of New York-Cortland and author of the "The Politics of Gun Control."

At the same time, he said, the NRA is experiencing a "Trump slump" -- a common occurrence when the White House occupant is viewed as supporting gun rights. "They can't point to the president and say, 'He's coming to take your guns away,'" Spitzer said.

On Monday evening after reclaiming his leadership spot at the NRA, LaPierre, the organization's battle-hardened chief executive, pledged the NRA's board, leaders and members would "come together as never before in support of our country's constitutional freedoms."

"United we stand," LaPierre declared.

The politics of guns

Polls show Americans support gun-control measures by a large margin: 60 percent of registered voters polled by Quinnipiac University in March back stricter gun laws , up from 54% more than a decade ago. There's a partisan split, however, with Democrats and independents more supportive of gun control than Republican voters. And 93% of those polled recently by Quinnipiac support requiring background checks for all gun buyers.

More than 20 states passed some form of gun regulation in the year after Parkland, according to the Giffords Law Center to Prevent Gun Violence. And dozens of candidates supported by gun-safety groups last year -- including Georgia Democratic Rep. Lucy McBath, who lost her son to gun violence in 2012 -- now hold US House seats.

In February, the Democratic-controlled House passed a universal background-check bill , the most significant gun control legislation to clear the chamber in two decades. (Its prospects are dim in the Senate, where Republican leaders have said they are unlikely to take up the measure.)

Some candidates in the 2020 Democratic presidential field also are advocating for gun control -- once viewed as the dangerous, untouchable so-called third-rail in American politics.

California Sen. Kamala Harris, during a CNN town hall last week, promised a series of executive actions she would take on gun control if Congress failed to act within her first 100 days in office. Another Californian seeking the Democratic nod, Rep. Eric Swalwell, has made gun safety the central issue of his longshot bid.

Meanwhile, Everytown for Gun Safety, a gun control group founded by former New York City mayor Michael Bloomberg, has pushed for broad changes to state and federal laws. The group spent $30 million in the 2018 midterm elections at the federal, state and local level, up from $25 million in 2016, Everytown officials say.

Additionally, the NRA's influence in federal elections has been on the wane.

After spending more than $54 million in the 2016 election -- more than $30 million of which was spent to help elect Donald Trump -- the group's spending plummeted in the 2018 midterm elections, according to the nonpartisan Center for Responsive Politics.

"There's no question about it: As they struggle, we get stronger," John Feinblatt, Everytown's president, said of the NRA in an interview with CNN on Monday. "They are experiencing a five-alarm fire, and they lit the match, while we continue to press in Congress and state capitols for progress on gun safety."

NRA in crisis?

Tensions among the group's leaders broke open at the NRA's annual convention this weekend. North's departure on Saturday came after he and other NRA members tried to oust LaPierre in an ugly standoff over the group's finances.

By late Monday afternoon, LaPierre had prevailed, securing unanimous support for re-election as the NRA's CEO and executive vice president.

Carolyn Meadows, a longtime NRA board member, was elected president.

"The challenges ahead of us are our greatest opportunities -- confronting our adversaries" and defending the organization, LaPierre said.

The internal fight that spilled into the open over the weekend had been brewing for months as the organization faced new scrutiny over its finances.

Earlier this month, the NRA sued its advertising agency, claiming the company -- Oklahoma-based Ackerman McQueen -- failed to provide records supporting its billing and disclose details about a separate contract Ackerman had with North.

North, a retired Marine lieutenant colonel who was a central figure in the Iran-Contra affair of the 1980s, became the NRA's president last year.

The NRA paid Ackerman and a subsidiary more than $40 million in 2017, the NRA said in the lawsuit.

The company has called the allegations in the lawsuit "false" and "frivolous." Ackerman officials on Monday declined to comment to CNN.

In recent days, North accused LaPierre of misconduct, including using $200,000 to purchase clothing from an NRA vendor, according to The Wall Street Journal

As the leadership struggle unfolded at the NRA's gathering in Indianapolis, a new threat emerged when New York Attorney General Letitia James announced Saturday that she had launched an investigation into the group.

She has jurisdiction over the association because it was chartered in New York, and her office has wide authority to investigate, including the power to subpoena records.

James promised to pursue the NRA during her campaign, and, in an interview with Ebony magazine last fall , she called the NRA a "terrorist organization" masking itself as a charitable group.

James' probe "means the future of the NRA is no longer in their own hands," said Feinblatt, whose group also has filed an IRS complaint that challenges the group's tax-exempt status and is among the funders of The Trace, a digital news organization that has investigated the NRA.

Other gun-safety groups are also pursuing actions related to the NRA. Giffords, a group linked to former Arizona congresswoman and gun violence survivor Gabby Giffords, is suing the Federal Election Commission for failing to act on its complaints, claiming a pattern of the NRA improperly coordinating its political spending with Trump and other Republican candidates.

For its part, the NRA has a lawsuit pending against New York state officials, arguing New York regulators have improperly discouraged banks and insurers from doing business with the organization.

In a statement over the weekend, the NRA's outside attorney William Brewer III said the group would "fully cooperate" with the New York inquiry into its finances. He said the NRA "has full confidence into its accounting practices and commitment to good governance."

'Mistake to count the NRA out'

Trump, who addressed the NRA's annual gathering on Friday as the controversy began to bubble up, weighed in on Twitter on Monday to side with the NRA. He accused New York officials -- including New York Gov. Andrew Cuomo -- of "illegally using the state's legal apparatus to take down and destroy" the organization.

Later that day, Cuomo, a Democrat, dismissed Trump's claim about the legality of New York's actions in a statement, saying, "Unlike you, President Trump, New York is not afraid to stand up to the NRA."

Now the question ahead is whether the dispute roiling the NRA causes long-term harm to the nearly 150-year-old association, which counts some 5 million people among its membership.

Experts such as Spitzer say it's too soon to tell. The NRA has weathered big storms, most notably in the 1990s, following Timothy McVeigh's 1995 bombing of a federal building in Oklahoma City.

The NRA had no role in the attack, but the bombing -- which killed 168 people -- put a spotlight on the NRA's forceful rhetoric.

Media reports following the attack highlighted a fundraising letter LaPierre had sent out before the bombing that warned a newly passed assault-weapons ban would "give jackbooted government thugs more power to take away our constitutional rights."

The remarks shocked some prominent NRA members. Former President George H.W. Bush even resigned his lifetime NRA membership over the issue.

LaPierre survived the leadership fight that ensued -- as he did this week -- and NRA officials "revived their fortunes," Spitzer said.

"Politics, like most things, tends to be cyclical, just as the power of the NRA has been cyclical," he said. "It would be a mistake to count the NRA out or assume they won't be a major factor in the gun debate."