The National Rifle Association offered free help to schools that hire armed guards to protect their students and backed expansion of the federal government’s list of banned guy buyers, but it defiantly warned Thursday against Washington’s overreach after last week’s school massacre.

Executive Vice President and CEO Wayne LaPierre said FBI bungling, mental illness and lax school security were at the root of the Valentine’s Day shooting that left 17 dead at Marjory Stoneman Douglas High School. He said the solution is better protection, not tighter gun laws.

“Our banks, our airports, our NBA games, our NFL games, our office buildings, our movie stars, our politicians — they’re all more protected than our children at school. Does that make any sense to anybody?” Mr. LaPierre told a Washington audience at the Conservative Political Action Conference, a gathering of grass-roots leaders on the right.

SPECIAL COVERAGE: CPAC 2020 - Latest news from the Conservative Political Action Conference

His annual speech to CPAC is always compelling, but this year’s version was all the more so because of the timing, giving Mr. LaPierre a chance to respond to the NRA’s critics, a group that now includes many of the students who survived the Florida shooting. Some of the survivors are leading a nationwide effort to enact strict controls on what weapons can be bought and who can buy them.

Mr. LaPierre, though, warned against “opportunists” using the tragedy to advance a “socialist agenda” that begins with denying gun rights. He said the response to the shooting should be careful and targeted.

“Demand what works,” he said. “Put armed security in every school. Fix the broken mental health system. Enforce the federal gun laws against every criminal thug on the street. Prosecute dangerous people when they show up to buy a gun. And, for God’s sake, put every prohibited person into the system. That’s what common-sense gun laws look like.”

He said the NRA will provide free support through its School Shield program to help any school place armed security guards in its hallways.

The “good guy with a gun” philosophy is also being advanced by the White House. President Trump this week talked about offering bonuses to teachers who are willing to take training and then arm themselves on school grounds.

Mr. LaPierre also said his organization supports efforts to ensure that the National Instant Criminal Background Check System gets all the records it is supposed to have. He said states leave out at least 7 million felony convictions that could be in the system.

He also called for more prosecutions of those on the banned list who try to buy weapons.

“In 2010, roughly 80,000 prohibited people committed a felony by trying to buy a gun. Just 44 were prosecuted for it. Does that sound like a good number to anybody?” he said. “So, when you hear politicians who won’t fix the broken system talk about expanding it, don’t buy it.”

Mr. LaPierre said the NRA will oppose expanding the system to include people whom the government has flagged for potential mental health problems but who have never officially been adjudicated mentally deficient. The Obama administration made several such efforts in its waning days.

Adding more mental health records into NICS appears to be one area with broad support among people on both sides of the gun issue.

“In some of that speech, he had some good things to say about the background check system,” said Avery Gardiner, co-president of the Brady Campaign to Prevent Gun Violence. “That’s good — we should get more records into the background check system, absolutely.”

Ms. Gardiner also said, though, that the NRA supported a legal effort during the 1990s challenging the entire Brady gun bill — which initially set up the background check system — as unconstitutional.

“So it comes across as very disingenuous,” she said.

Some of the students from Stoneman Douglas have made the NRA their chief target in the aftermath of the shooting. They have taken to Twitter and crusading cable news networks to criticize those who have worked with the gun rights group and vowed to deny them funding.

Mr. LaPierre, though, criticized “the shameful politicization of tragedy” by Democrats and the news media.

“They hate the NRA. They hate the Second Amendment. They hate individual freedom,” he said. “Their goal is to eliminate the Second Amendment.”

He name-checked a handful of potential 2020 Democratic presidential contenders as among those opponents: Sens. Kamala D. Harris of California, Elizabeth Warren of Massachusetts, and Cory A. Booker of New Jersey, as well as New York Gov. Andrew Cuomo.

“If they seize power — if these so-called new European socialists take over the House and the Senate, and God forbid they get the White House again — our American freedoms could be lost, and our country will be changed forever,” he said.

Senate Minority Leader Charles E. Schumer, New York Democrat, shot back by saying the NRA refuses to accept the role access to guns played in last week’s shooting. He also lamented what he described as undue influence the group holds over congressional Republicans and President Trump.

“The NRA is once again spewing pathetic, out-of-touch ideas, blaming everything but guns,” he said.

Ms. Harris, who as California’s attorney general fought in court to preserve the state’s tough gun laws, vowed to deepen the fight for gun control.

“I am not going to be silenced by attacks from the NRA or anyone else — and neither will my Senate colleagues or the students from Stoneman Douglas. It’s time to stand up to the gun lobby and keep our communities safe,” she said on Twitter.

That message was not a big seller at CPAC, where attendees sided with Mr. LaPierre in fearing broad bans on the style of semi-automatic rifles used in the Florida attack and other recent mass shootings.

“I don’t think banning weapons is the right thing to do,” said Connor Graves, 19. “I think it is more about a mental health issue than a gun issue.

“I am from South Dakota, and we have a lot of guns and not a lot of shootings,” he said. “I see it as more of a social issue than a gun issue. I actually have an AR-15 at home, and I haven’t shot anyone.”

⦁ Seth McLaughlin contributed to this report.