The Senate rejected a measure Tuesday that would have extended a pay freeze for federal employees for another year.

By a vote of 51 to 47, the chamber turned down an amendment to a highway funding bill introduced by Sen. Pat Roberts (R-Kan.) that would have extended the freeze through January 2014 to fund energy projects, an adoption tax credit, and tax deductions for college expenses and for state and local property taxes.

The vote came during debate on the federal highway funding measure. The White House has said it will oppose any effort to extend the pay freeze for another year to pay for federal programs or to pay down the federal deficit.

A coalition of groups representing federal employees had denounced the bill as another attempt to curtail federal compensation to offset the costs of tax breaks and policies unrelated to the public-sector workforce.

“The Republicans are coming forward with another attack on federal workers,” Sen. Benjamin L. Cardin (D-Md.) said during a brief floor discussion before the vote.

Sen. Barbara A. Mikulski (D-Md.) said in a statement afterward that federal employees “should not be treated as scapegoats. They are already operating under a pay freeze, they are already facing deep cuts at their agencies, yet they continue to be targeted by Republican plans to extend their pay freeze or pass backdoor pay and benefit cuts.”

Under a 2010 law, federal pay rates were not increased in 2011 or 2012, although employees have remained eligible for raises upon promotion or upon advancing in their pay grades.

The House voted in February to approve a one-year extension of the freeze as part of a separate bill. The White House, however, has recommended a 0.5 percent pay increase for civilian federal employees that would start next January.

The last general raise, 2 percent, was paid in January 2010.

“I think it’s good,” Melissa Dantic, who works for the Department of Veterans Affairs, said of the Senate vote. She said she was not happy with the existing freeze. “I think with everything going on, with gas [prices] increasing, you need extra money. If you’re a GS-12 with a family, you’re living paycheck to paycheck in this area. If we could get a raise, I think it would help everyone.”

“We work as much as the private industry. We deserve a raise,” said Michael Laboy, a Federal Aviation Administration employee. He said it is not promising that a lawmaker would propose a pay freeze extension.

Employee organizations noted that many other proposals to curtail federal worker compensation are pending in Congress. “It is well past time to stop these attacks on their pay, benefits and rights,” said Colleen M. Kelley, president of the National Treasury Employees Union.

“Although we are relieved that this latest affront to America’s federal workers failed, we’re still on guard for the next attempt to weaken our federal workforce and the vital services and protections it provides,” said Joseph A. Beaudoin, president of the National Active and Retired Federal Employees Association.

Staff writer Timothy R. Smith contributed to this report.