David Cameron
The UK Prime Minister was addressing attendees at a Conservative Friends of Israel annual lunch Reuters

The UK Prime Minister has criticised Ed Miliband and his party for "showing their true colours" after Labour MPs voted for a symbolic motion to recognise Palestine as a state.

Cameron, speaking during the Conservative Friends of Israel's largest annual lunch, argued that Miliband was wrong to have voted to recognise Palestine as a state in October, The Jerusalem Post reported.

Labour won the vote in the House of Commons, with 274 votes for the motion and only 12 against.

But the backbench motion was a symbolic move and had no practical implications on UK government policy.

It stated: "That this House believes that the government should recognise the state of Palestine alongside the state of Israel."

The Prime Minister instructed ministers not to vote on the motion and the Liberal Democrats as well as the Conservatives gave their backbenchers a free vote.

However, Miliband imposed a one-line whip on his MPs to vote for the motion.

"We only recognise the state of Palestine when there is a genuine two-state solution – and [when] Israel's future is truly secure," Cameron said.

The Conservative Party leader claimed that Miliband could "easily have avoided or walked away from" the motion.

"But [he] actively whipped his own colleagues to support the motion," he added.

"That is the Labour leader we are now faced with, and he has to be defeated."

Cameron also blasted Leicester Council and Brent Council, two Labour-run local authorities, for supporting boycotts of Israel.

Leicester Council supported a boycott of Israeli settlement goods and Brent Council supported the Tricycle Theatre banning a Jewish film festival.

"Unlike Labour, we in this party oppose boycotts. And let me remind you of what I said to the Knesset [the legislative branch of the Israeli government]: 'Delegitimizing the State of Israel is wrong, it is abhorrent – and together we will defeat it'," Cameron said.

But the Prime Minister was critical of settlement building.

"True friends will always try to offer you good advice, and this is why I will always tell Israel that illegal settlements are a bad idea," Cameron said.

He added: "They make that aspiration less likely. And when I went to Jerusalem earlier this year, my message to the Knesset was this: Yes, we will tell you when we think you are wrong, but we will always defend your right to defend yourselves."

The comments come ahead of the 2015 General Election next May.