While America's right-wing celebrated, President Bill Clinton, in Cologne for a G8 summit, said: "I think when the American people figure out what they did in the dead of night, they will be bitterly disappointed. They'll be shaking their heads and they'll wonder what in the world is going on in Washington."
There has been strong pressure for legislation to curb guns after the killing of 15 children at a Colarado high school in April. But the National Rifle Association (NRA), America's pro-gun lobby, has worked hard to deflect any new initiatives.
The bill would have closed a loophole in gun regulations that makes it easier to buy guns at firearm shows than at shops, and would have required three days of background checks before a gun could be purchased. It was passed only narrowly in the Senate, with US Vice-President Al Gore casting the decisive vote.
But the House of Representatives, which is more dominated by the right wing of the Republican party, chopped the background check down to 24 hours. Forty-five Democrats crossed over to vote with the Republicans, while 47 Republicans opposed the amendment. It will not neccessarily become law as it must first be reconciled with the Senate legislation.
"We're going to work very hard to reverse it and to see if we can get a good bill out of this," said John Podesta, the White House Chief of Staff.
"This vote will not stand the light of day," Mr Clinton said. "I will keep working until Congress stands up to the gun lobby and makes the common- sense measures passed by the Senate the law of the land."
The late-night manouevring shows the power of the NRA, an organisation that helped the Republicans win control of Congress in 1994.
"It was a great victory for the NRA, but it was a great defeat for the safety of our children," said Mr Clinton. He said the NRA wanted the vote to be at night "in the hope that no one would find out that they are still running the Congress, this Congress, for their own convenience, instead of for the interests of the people".
Mr Clinton has taken on the power of the NRA by backing anti-gun legislation, but many in his own party, fearing for their seats, have been more cautious.
Janet Reno, the Attorney General, said she would recommend that the president veto the legislation.
"But again I want to say it is so important for us to work through it now and, as we proceed this morning with Congress further considering the legislation, to look at what has been done and take steps to correct it now," she said.Reuse content