WASHINGTON (AP) -- The U.S. Senate has rejected a bipartisan effort to expand federal background checks to more firearms buyers in a crucial showdown over gun control.

Wednesday’s vote was a jarring blow to the drive to curb firearms sparked by December’s massacre of children and staff at an elementary school in Connecticut. President Barack Obama made broadened background checks the centerpiece of his gun control proposals.

The roll call was also a victory for the nation’s most powerful gun lobby, the National Rifle Association, which opposed the plan as an ineffective infringement on gun rights.

The proposal would have required background checks for all transactions at gun shows and online. Currently they must occur for sales handled by licensed gun dealers.

Even before the vote began it was apparent that bill was in deep trouble with a growing number of Senators saying they would vote against the measure.

“As of this morning, we’re short. We need more votes. It’s close,” Sen. Joe Manchin, a sponsor of the background check compromise, said in a brief interview before the vote Wednesday.

Rejection of the provision marked a jarring setback for gun control advocates, who had hoped December’s slayings of 20 young children and six educators at the Sandy Hook elementary school in Newtown, Connecticut would sway Congress to curb firearms violence.

Some of the victims’ families, with the backing of President Barack Obama, had launched an increased effort to lobby lawmakers personally and push a gun control bill through a bitterly divided Congress.

The Senate gun bill would have extended background checks to nearly all gun purchases, toughen penalties against illegal gun trafficking and add small sums to school safety programs. However, even if passed, the bill stops well short of Obama’s original call to ban assault rifles and the high capacity magazines that leave shooters able to fire large bursts of ammunition without having to reload.

Perhaps helping explain Democrats’ problems, an AP-GfK poll this month showed that 49 percent of Americans support stricter gun laws. That was down from 58 percent who said so in January—a month after the December killings propelled gun violence into a national issue.

Just over half the public -- 52 percent—expressed disapproval in the new survey of how Obama has handled gun laws. Weeks after the Newtown slayings, Obama made a call for near universal background checks the heart of his gun control plan.

The Senate planned to hold eight other votes Wednesday besides the one on background checks, all of them amendments to a broad gun control measure.

They included Democratic proposals to ban assault weapons and high-capacity ammunition magazines, which are expected to lose; a Republican proposal requiring states to honor other states’ permits allowing concealed weapons, which faces a close vote; and a Republican substitute for the overall gun measure.

The concealed weapons amendment, seen by advocates as protecting gun rights, was vehemently opposed by gun control groups, who say it would allow more guns into states with stricter firearms laws.

Even if a gun control bill passes the Senate, it would face a tough road to approval in the Republican-led House of Representatives and could possibly die there.

Wednesday’s first vote was on an amendment by Democratic Sen. Manchin and Republican Sen. Patrick Toomey, extending the background checks to firearms sales at gun shows and online. The compromise was widely seen as advocates’ best chance for winning enough Republican votes to muscle broadened checks through the Senate.

Opponents say expanded background checks would be ignored by criminals and violate the Second Amendment of the U.S. Constitution which guarantees the right to bear arms. They fear that it could lead to a national registry of gun owners that would facilitate taxing or confiscating their firearms.