President Barack Obama didn’t mince words Wednesday when he blasted lawmakers for failing to pass compromise legislation on background checks he believes would curb gun violence. He also blamed the gun lobby for intimidating senators.

The U.S. Senate voted 54-46 to reject a measure to close loopholes at gun shows and in online sales. The legislation was brokered by Sens. Joe Manchin, D-W.Va., and Pat Toomey, R-Pa.

“Instead of supporting this compromise, the gun lobby and its allies willfully lied about the bill,” Obama said in a press conference following the bill’s defeat. “They claimed it would’ve created some Big Brother registry. ... And unfortunately this pattern of spreading untruths about this legislation served a purpose, because those lies upset an intense minority of gun owners and that, in turn, intimidated a lot of senators.”

This defeat of this measure is a loss for the president, who urged lawmakers to include a plan to expand background checks in their gun violence measure in the immediate aftermath of the Sandy Hook massacre last December, in which 26 people including 20 children lost their lives. The senators' failure to pass the law was also a blow to the family members of victims who died in gun violence. The families have been on Capitol Hill since last month, meeting with senators and urging them to pass what they believe is common-sense laws that could protect Americans.

Obama suggested that senators voted to preserve their jobs and encouraged the voting public to never let lawmakers forget it when election time rolls around.

“If action by Congress could have saved one person, one child, a few hundred, a few thousands ... we had an obligation to try,” Obama said. “And this legislation met that test, and too many senators failed theirs.”

The president said the Senate’s failure only preserved loopholes for criminals to buy guns.

“It begs the question: Who are we here to represent?” Obama asked. “All in all, this was a pretty shameful day for Washington. But this effort isn't over. We can still bring about meaningful changes to gun violence as long as the American people don’t give up on it.

“If this Congress refuses to listen to the American people and pass common-sense gun legislation, then the real impact is going to have to come from the voters,” Obama noted. “To all the people who supported this legislation ... let your representatives in Congress know that you are disappointed, and, if they don't act this time, you will remember come election time.”

Obama said, “Sooner or later, we are going to get this right.”