Photo

Senator Bernie Sanders received praise for his views on gun control on Monday from a group that he would probably like some distance from: the National Rifle Association.

Mr. Sanders got into a dispute with Hillary Clinton during the Democratic presidential debate on Sunday night about whether gun manufacturers should be held responsible for the actions of people who buy weapons legally and go on to commit crimes. Mrs. Clinton supports such liability, while Mr. Sanders argues that it would mean the end of the gun industry.

As they debated the point, Mrs. Clinton said, “That is like the N.R.A. position.”

The lobbying group for the gunmakers does agree with Mr. Sanders, and took to Twitter on Monday to declare his position “spot on.”

It also praised the Vermont senator for pushing back against Mrs. Clinton’s “lies.”

The praise puts Mr. Sanders, who has been viewed by some as weak on gun control, in an awkward position of having the backing of a group that many Democrats loathe.

The Clinton campaign seized on the N.R.A.’s endorsement of Mr. Sanders’s position as evidence that he is out of touch with Democrats when it comes to guns.

“While the N.R.A. defends Bernie Sanders it attacks Hillary Clinton,” said Ian Sams, a spokesman for Mrs. Clinton. “What more do we need to know?”