The US House of Representatives has overwhelmingly approved a bipartisan measure that rebukes the United Nations for criticising Israeli settlements.

The congressional non-binding resolution was passed by 342 to 80 on Thursday. It declares unwavering support for Israel and insists that the United States reject any future UN actions that are similarly "one-sided and anti-Israel".

Republicans used the debate to accuse President Barack Obama of turning his back on Israel over his administration's decision to abstain and allow the UN Security Council to approve in December a resolution calling settlements in the West Bank and East Jerusalem "a flagrant violation under international law".

"Our government abandoned our ally Israel when she needed us the most," said House Speaker Paul Ryan.

"It is time to repair the damage done by this misguided hit job at the UN."

OPINION: The UN settlement resolution is too little and too late

The House measure divided Democrats with many saying they opposed it because it contained inaccuracies and distorted the complexities of the Middle East peace process.

They also accused Republicans of attacking Obama unfairly in the waning days of his presidency.

"The point of the measure seems to be to bash Obama on the way out," said Democrat Gerry Connolly, who along with many others of his party still voiced strong support for Israel.

They said Obama deserved credit for engineering last year's new, long-term security agreement that gives Israel $38bn in US military aid, including $5bn for missile defence.

A similar bipartisan measure to reprimand the UN has been introduced in the Senate.

"Israel is always the bad guy in the eyes of the United Nations," said Senator Lindsey Graham, one of the measure's co-sponsors.

'Shameful ambush'

Although the US is opposed to the settlements, it has traditionally used its veto power as a permanent member of the Security Council to scuttle resolutions that condemn Israel.

Benjamin Netanyahu, Israel's prime minister, accused Obama of a "shameful ambush" and said he was looking forward to working with President-elect Donald Trump, whom he described as his friend.

But Secretary of State John Kerry said in a late December speech that the US was standing up for a two-state solution when it abstained on the resolution.

He criticised Israel for settlement building and blamed Netanyahu for dragging Israel away from democracy.

About 600,000 Israelis live in Jewish-only settlements, which are illegal under international law and seen as a major stumbling block to peace efforts.

The Palestinians want an independent state in the West Bank, including East Jerusalem, and Gaza, areas Israel captured in a 1967 war.