The day's key test concerned the background checks, designed to prevent criminals and the seriously mentally ill from purchasing firearms. Under current law, checks are required only when guns are purchased from federally licensed firearms dealers. The proposal by Manchin and Toomey called for extending the requirement to other sales at gun shows and on the Internet.
Their bipartisan approach was widely seen as advocates' best chance for winning enough GOP votes to change current law in a way that Obama and gun control groups support. But foes had proposals of their own, including one that would require states that issue concealed weapons permits to honor the permits from other states.
In the hours leading to a vote on the background check measure, Democrats Heidi Heitkamp of North Dakota and Mark Pryor of Arkansas and Republican Kelly Ayotte of New Hampshire became the latest senators to announce their opposition.
On the vote, Democratic Sens. Mark Begich of Alaska and Max Baucus of Montana joined Pryor and Heitkamp in voting against the proposal. Senate Majority Leader Harry Reid, a supporter of the plan, switched his vote to the prevailing "no" side to permit him to call for a revote in the future.
Begich, Pryor and Baucus are all seeking re-election next year. In an indication of the intensity of the feelings on the issue, the Progressive Change Campaign Committee, a liberal group, swiftly announced it would seek to defeat them in 2014.
Among Republicans, Sens. Susan Collins of Maine, Mark Kirk of Illinois, John McCain of Arizona and Toomey sided with Democrats.
Numerous polls in recent months have shown support for enhanced gun control measures, including background checks, though it may be weakening.
An Associated Press-GfK poll this month showed that 49 percent of Americans support stricter gun laws, down from 58 percent in January. In that recent survey, 38 percent said they want the laws to remain the same and 10 percent want them eased.
Obama has made enactment of greater curbs a priority on his domestic agenda in the months since the massacre at Newtown, making several trips outside Washington to try and build support. Last week, he traveled to Connecticut, and he invited several parents to fly back to Washington with him aboard Air Force One so they could personally lobby lawmakers.
To an unusual degree for professional politicians, some senators said afterward that they had not wanted to meet with the mothers and fathers of the dead, or said it was difficult to look at photographs that the parents carried of their young children, now dead.
Sen. Rand Paul, R-Ky., said before Wednesday's vote, "I think that in some cases, the president has used them as props, and that disappoints me."
Some of the parents of the Sandy Hook victims watched the votes from the spectators' gallery that rings the Senate floor. They were joined by relatives of victims of other mass shootings in Arizona, Virginia and Colorado.
At the White House, press secretary Jay Carney said some of them had met earlier in the day with lawmakers, who he said should "consider who they're representing.
"Ninety percent of the American people support expanded background checks," he said.
Democratic aides said in advance that the day's events would end debate on the issue for the time being. But they added they expect Senate Majority Leader Harry Reid to bring it back to the floor in the coming months, after supporters of greater controls have had more time to rally public support.
The NRA told lawmakers it intended to keep track of how the votes were cast, and consider them in making decisions about its efforts in the mid-term elections for Congress next year.
An opposing group, Mayors Against Illegal Guns, funded by New York City Mayor Michael Bloomberg, said it would do likewise.
The NRA has a long track record in electoral politics, and is viewed by lawmakers in both political parties as unusually effective. Bloomberg's organization has yet to be tested.