Media playback is unsupported on your device Media caption David Cameron said the UN should "win the battle of ideas not just the battle of military might"

David Cameron has said the UK is ready to "play its part" in fighting Islamic State, which he called an "evil against which the whole world must unite".

Speaking at the UN in New York, the prime minister said "past mistakes" must not be an "excuse" for inaction.

He spoke as US and Arab jets continued bombing Islamic State (IS) targets in Syria, after attacks began on Tuesday.

The UK cabinet has been meeting to discuss possible air strikes in Iraq, with Parliament due to vote on Friday.

'Barbaric acts'

MPs will debate a motion ruling out any air strikes against Syria or using ground troops.

But they will be asked to back UK bombing of IS in Iraq which the motion says poses a "clear threat" to the "territorial integrity" of the country.

The motion also "condemns the barbaric acts" of IS and the "humanitarian crisis" the militants are causing.

In his UN speech, Mr Cameron said the Iraqi government had made a "clear request" for international military assistance against IS, which has taken control of large parts of Iraq and Syria in recent months.

He said this provided a "clear basis in international law for action".

Analysis

Image copyright Getty Images

by Nick Bryant, BBC United Nations correspondent

David Cameron's address at the UN felt like a dress rehearsal for the speech he'll deliver in the House of Commons on Friday, and his target audience seemed to be parliamentarians as much as diplomats in the hall.

Other than a few cursory words about Middle East peace, Ukraine and the Ebola outbreak in West Africa, it was devoted almost exclusively to making the case for British air strikes in Iraq.

Referring to the war there a decade ago, a conflict lodged so firmly in the minds of parliamentarians, he said that past mistakes should not become an "excuse for indifference or inaction".

He was also careful to spell out the legal case for air strikes in Iraq, a touchier issue in Westminster than it is in New York.

As well as air strikes, Mr said Western forces could equip, train and support local fighting forces.

He said IS, also known as Isil and Isis, had killed people of "every faith and none" and had "murderous plans to expand its borders well beyond Iraq and Syria and to carry out terrorist atrocities right across the world".

It comes after a third night of US-led air strikes against the militants targeted oil refineries in Syria.

Five civilians and 14 IS fighters were killed in the east of the country, according to UK-based activist group Syrian Observatory for Human Rights.

Image copyright Unknown Image caption Ibrahim Kamara is thought to have been killed in US air strikes near Aleppo

British jihadists are among those thought to have been killed in air strikes earlier this week.

Khadijah Kamara told the BBC she believed her 19-year-old son Ibrahim, who went to Syria in February, was among the dead.

The 35-year-old, from Brighton, said: "I forgive him, may God have mercy on him. I'm not angry.

"I just pray that God forgives him. Think about how your actions will affect your family. The impact on people who care about you."

He is thought to have been fighting with al-Qaeda affiliate group Jabhat al-Nusra, BBC Newsnight's Secunder Kermani said.

Our reporter added that a source in Syria had told him that, as well as Mr Kamara, three British men of Bengali heritage from the London area were killed on Monday.

Image copyright YouTube Image caption A new IS video purportedly shows new recruits

Addressing the UN, Mr Cameron said it was "right" to learn lessons from the past - especially from the 2003 invasion of Iraq - but leaders must not be "frozen with fear".

"Isolation and withdrawing from a problem like Isil will only make matters worse," he said.

"We must not allow past mistakes to become an excuse for indifference or inaction."

He also said:

the international community should support "representative and accountable" Middle Eastern governments to fight IS - not go "over their heads"

"partners" in the region could include Iran - though he met the Iranian president on Wednesday and said there were "severe disagreements" between the two countries

it was "dangerously misguided" to suggest working with the Assad regime in Syria, which is also fighting IS

all nations must stop "so-called non-violent extremists from inciting hatred and intolerance"

'Network of death'

Mr Cameron said IS had recruited fighters from around the world, including 500 from Britain.

One of these Britons "almost certainly" killed the two American journalists and the British aid worker whose beheadings featured on IS videos posted online in recent weeks, he said.

The UN Security Council has adopted a binding resolution compelling states to prevent their nationals joining jihadists in Iraq and Syria.

US President Barack Obama chaired the session and called for global efforts to dismantle the IS "network of death".

The president said more than 40 countries had offered to join the coalition against IS.

The US started bombing IS targets in Iraq last month and began air attacks in Syria on Tuesday.

Image copyright Reuters Image caption The UK is considering joining the US in carrying out air strikes in Iraq

Image copyright Reuters Image caption Buildings in Raqqa were damaged by the US-led air strikes in Syria

Labour and the Liberal Democrats are supporting the plan for UK air strikes in Iraq.

Sir Menzies Campbell - a former Lib Dem leader and prominent opponent of the 2003 Iraq invasion - said he was "satisfied there are perfectly sound legal grounds" for the attack.

"The request has been made by the Iraqi government," he told Sky News.

"The very future of Iraq is at stake and we're quite entitled to adopt and accept that request and to become involved"

Sir Menzies accused IS of "systematic barbarism", adding: "Effectively there's ethnic cleansing going on."

Full text of Friday's Commons motion

That this House:

Condemns the barbaric acts of ISIL against the peoples of Iraq including the Sunni, Shia, Kurds, Christians and Yazidi and the humanitarian crisis this is causing;

Recognises the clear threat ISIL pose to the territorial integrity of Iraq and the request from the government of Iraq for military support from the international community and the specific request to the UK government for such support;

Further recognises the threat ISIL poses to wider international security and the UK directly through its sponsorship of terrorist attacks and its murder of a British hostage;

Acknowledges the broad coalition contributing to military support of the government of Iraq, including countries throughout the Middle East;

Further acknowledges the request of the government of Iraq for international support to defend itself against the threat ISIL poses to Iraq and its citizens, and the clear legal basis that this provides for action in Iraq;

Notes that this motion does not endorse UK air strikes in Syria as part of this campaign, and any proposal to do so would be subject to a separate vote in Parliament;

Accordingly supports Her Majesty's Government, working with allies, in supporting the government of Iraq in protecting civilians and restoring its territorial integrity, including the use of UK air strikes to support Iraqi, including Kurdish, security forces' efforts against ISIL in Iraq;

Notes that Her Majesty's Government will not deploy UK troops in ground combat operations;

Offers its wholehearted support to the men and women of Her Majesty's armed forces.

BBC deputy political editor James Landale said the government was "confident" of winning Friday's vote - but it did not propose military action in Syria because of the legal impediments of acting there without the support of the Assad regime.

However, former UK attorney general Dominic Grieve told BBC Newsnight the Iraqi government's request for help could make it possible for the UK to take military action in Syria without breaching international law.

He said there was evidence that some attacks were "spilling over the border" from Syria into Iraq, so the UK could use "reasonable, necessary and proportionate means" to help Iraq defend itself.

He said it might also be possible to make a legal case for intervening in Syria under the "doctrine of humanitarian necessity" to protect people from IS genocide.