WASHINGTON — The US House of Representatives on Wednesday gave final approval to a measure aimed at helping military veterans of the wars in Iraq and Afghanistan get jobs, and repealing certain payments required of government contractors.

The lopsided 421-0 vote sent the legislation to President Barack Obama to sign into law in what would be a rare show of bipartisan consensus in polarized Washington one year from November 2012 elections.

"I want to congratulate Republicans and Democrats in Congress for coming together to pass these tax credits that will encourage businesses to hire America's veterans," Obama said in a statement.

Obama, who had included the credits in a $447 billion jobs package now stalled by Republican opposition, said the measure "is a good first step, but it is only a step" and urged approval of his overall proposal.

The legislation, which had cleared the Senate in a 95-0 vote, calls for special tax credits for companies that hire former troops, who have struggled to find work in the job-scarce US economy.

It also repeals a 2006 law, which had not yet gone into force, requiring government agencies to withhold some payments to private contractors as a hedge against those who do not pay their taxes on time.

The law, enacted with broad bipartisan support at a time when Washington's reliance on contractors in war zones drew scrutiny and anger, requires agencies to withhold three percent of payments to contractors.

But supporters of a repeal, including the White House, said it unfairly punished the vast majority who play by the rules -- and could stifle hiring by those businesses at a time when the US economy sags under high joblessness.