LOUISVILLE — The head of the National Rifle Association’s lobbying arm gave Bernard Sanders a shout-out on Saturday for the Vermont senator’s stance on whether people should have the right to sue gun makers and manufacturers.

“I don’t say this often - okay, fine, I’ve never said it - but Bernie’s right,” said Chris Cox, executive director of the NRA Institute for Legislative Action. “Holding gun manufacturers liable for the acts of madmen and terrorists will put [them] out of business overnight. And if there are no firearms, there’s no firearms freedom.”

Mr. Cox had played a clip of Mr. Sanders from a Democratic presidential debate in March in which the senator was asked about his support for legislation last decade to shield gun makers from lawsuits.

“If you go to a gun store and you legally purchase a gun, and then three days later you go out [and] you start killing people, is the point of this lawsuit to hold the gun shop owner or the manufacturer of that gun liable? If that is the point, I have to tell you, I disagree,” Mr. Sanders said.

The senator did say during that debate that manufacturers could be held liable if they knowingly sell guns into an area where they’re likely to fall into the hands of criminals.

“But if they are selling a product to a person who buys it legally, what you’re really talking about is ending gun manufacturing in America,” Mr. Sanders added. “I don’t agree with that.”

Democratic front-runner Hillary Clinton has repeatedly hammered Mr. Sanders for his position on the issue during the Democratic presidential primary contest.

In January, Mr. Sanders did say he was “pleased” that legislation to amend a 2005 law on gun manufacturers’ liability had been introduced, while reiterating his concern about the potential impact the law could have on small gun stores.

During his speech at the NRA’s annual meeting of members at the gun-rights group’s convention in Louisville, Mr. Cox also talked about the possibility of Mrs. Clinton’s suing gun manufacturers “into bankruptcy.”

“The logic behind her argument is so absurd that it’d be laughable if the threat wasn’t so real,” Mr. Cox said.

“When a criminal knocks out a convenience store clerk with a baseball bat, you don’t sue Louisville Slugger,” he said. “And when a drunk driver rolls his car into oncoming traffic, you don’t sue General Motors.”

“But when a terrorist shoots dozens of people in San Bernardino or a deranged monster slaughters schoolchildren, well, according to Hillary, that’s the gun manufacturers’ fault,” he said. “And they ought to be sued for it.”