It would have expanded checks to cover all firearms sales at gun shows and over the Internet, but would have exempted sales between friends and acquaintances outside of commercial venues.

Democrats felt confident the compromise could pass once Toomey, a Republican with an A rating from the National Rifle Association, signed on. They were caught off guard by the vigorous lobbying campaign waged by the NRA, which warned lawmakers that Manchin-Toomey would be a factor in its congressional scorecard.

What appeared to be a likely victory for the president was resoundingly defeated by the Senate as jittery Democrats facing tough reelections next year joined nearly the entire Republican conference.

The NRA released a statement immediately after the vote that said the measure would have "criminalized certain private transfers of firearms between honest citizens."

"As we have noted previously, expanding background checks, at gun shows or elsewhere, will not reduce violent crime or keep our kids safe in their schools," NRA executive director Chris Cox said in a statement.

Now Democratic leaders will have to overhaul the pending gun control bill to give it a chance of passing the Senate in diminished form.

The Senate’s failure to expand background checks means the three pillars of Obama’s gun control agenda have stalled. The chamber is expected to also reject proposals to ban military-style semi-automatic weapons and high-capacity ammunition clips.

Gun control and immigration reform are two of the president’s biggest second-term priorities.

White House officials refused to acknowledge the likely defeat of Manchin-Toomey right up until the Senate vote.

At the White House briefing on Wednesday, press secretary Jay Carney told reporters that while they believed passing the legislation “was always going to be difficult ... we believe there is a path, a very difficult path, to get to 60 votes.”

A seemingly frustrated Carney railed against NRA-backed lawmakers, whom he said had spread “a lot of bogus information” about the amendment on background checks.

Manchin also criticized the NRA, who had given him an A rating, for distorting the substance of his amendment.

“I was surprised when the latest alerts from the NRA were filled with so much misinformation about the firearms background check legislation,” he said.

Manchin said the gun-owners-rights’ group told members the bill would criminalize the private transfer of firearms.

“I don’t know how to put the words any plainer than this: that is a lie,” he said.

Manchin and Toomey are likely to see their NRA rating downgraded as a result of leading the charge to expand background checks.

Obama and Vice President Biden kept their distance from the Manchin-Toomey in the days leading up to the vote, perhaps fearing their involvement could scare off potential Republican and conservative Democratic supporters.

Obama called Begich and Pryor last week, but did not press them hard on the vote.

“It wasn’t a high-pressure sales job,” Pryor told The Hill on Monday.

Biden traveled to Capitol Hill to preside over the vote. He predicted Democrats would be able to expand background checks in the future if they fell short Wednesday.

“I can assure you one thing — we are going to get this eventually. If we don't get it today we are going to get it eventually,” Biden said.