The measure failed on an 8-8 vote in the House Judiciary Committee, with one Democrat joining Republicans in opposing it.
However, supporters hope to revive the measure.
Rep. Miguel Garcia, an Albuquerque Democrat who sponsored the bill, said he and others will consider revamping the bill and then try to bring it up for another vote later.
The debate over the gun legislation comes a month after a Connecticut school shooting that claimed 26 lives.
Federal law requires background checks for sales by licensed dealers in stores or at gun shows. However, the law doesn't cover firearm sales between private individuals, whether at a gun show or someone's home.
Garcia's proposal would have required background checks of private gun sales, including at gun shows.
Rep. Eliseo Alcon, a Milan Democrat, said he voted against the measure because adults—although not minors—would have been required to undergo a background check if they inherited or were given a gun from a family member. He said he would consider supporting the bill if that problem could be resolved. Alcon said constituents in his district, including many elderly Native Americans, had urged him to oppose the measure.
They considered the bill for more than four hours, and more than 200 people packed a public gallery
Democrats hold majorities in the Legislature but the committee vote underscored the difficulties that gun restriction proposals face in a Western state like New Mexico, which has a tradition of hunting and gun ownership.
Garcia said his proposal would help prevent sales of firearms to people prohibited from buying firearms, including convicted felons and those with a history of mental illness.
"We want to keep these weapons away from individuals who shouldn't be possessing them in the first place," Garcia said.
Opponents, including the National Rifle Association, said the bill won't stop criminals from acquiring guns because they typically don't try to buy firearms at gun shows.
"This bill is unenforceable and has the unintended consequence of affecting only those who follow the law and completely overlooks the fact that if someone wants to do us harm, they're going to find a way to do so—regardless of the law—with or without a gun," said Steve Aikens, a certified firearms instructor from Clovis.
Santa Fe Mayor David Coss supported the legislation and said he's a hunter and gun owner.
"I think it's a very common sense, public safety agenda," Coss said.
Lawmakers were shown some of the 194 firearms the city recently collected through a gun buyback programs. Included were handguns and military-style assault weapons with high capacity ammunition magazines.
NRA lobbyist Tara Reilly Mica said states like New Mexico should focus on improving the mental health records and other information in the federal background system and prosecuting those who try to illegally buy or sell guns.
Follow Barry Massey on Twitter at https://twitter.com/bmasseyAP