Media playback is unsupported on your device Media caption David Cameron said he would "not rule out taking further action" against IS

David Cameron says he will not rule out air strikes against Islamic State (IS), which is holding a British hostage.

Asked if strikes could be launched without Syrian backing, he said President Assad's government was "illegitimate" given his "war crimes".

The prime minister told the BBC action must not be "Western intervention over the heads of neighbouring states".

The BBC understands Tory MPs are being canvassed for their views on military action against IS by party whips.

Ransom

Extremist group IS, which has seized large swathes of territory in Iraq and Syria and declared a new caliphate - or Islamic state - has killed two US hostages in recent weeks.

It has threatened to next kill British aid worker David Haines, who it has been holding for more than a year, unless US air strikes on its positions in Iraq are halted.

Image copyright Facebook Image caption David Haines was captured in March last year with an Italian aid worker and two Syrians

Mr Haines, a 44-year-old father of two from Perth, was taken hostage in the village of Atmeh, in the Idlib province of Syria, in March 2013.

The threat to kill the Briton came during a video posted online on Tuesday showing the killing of US journalist Steven Sotloff. IS killed another US journalist, James Foley, last month.

Speaking as Western leaders gathered in Wales for a Nato summit, the prime minister said although the UK would not pay a ransom to free Mr Haines, he was "personally supervising" efforts to release him.

Mr Cameron is to urge Nato leaders to stop paying ransoms to terrorists to secure the release of hostages.

Ahead of a dinner at Cardiff Castle, he said he would warn leaders that money paid to terrorist kidnappers funded arms, weapons and terror.

"It's utterly self-defeating," he said. "It's worse than self-defeating - it's a risk to us back home."

In a reference to countries such as France and Italy, which are believed to pay ransoms, Mr Cameron noted that the G8 had agreed at Loch Erne last year to cease all such payments.

He said what mattered was "not the signature on a document, but not paying ransoms".

Earlier, the prime minister also said that - if requested by the Iraqi government - air strikes in Iraq would be legal.

Media playback is unsupported on your device Media caption David Cameron tells Sarah Montague about how the UK plans to face the challenge of IS

But when questioned on Radio 4's Today programme whether the UK could legally take military action in Syria without such a request from President Assad, Mr Cameron said he believed it was possible.

"The Iraqi government is a legitimate government. We believe it is about to become more legitimate with a new prime minister with the backing of all of his country - whereas President Assad has committed war crimes on his own people and is therefore illegitimate."

In other developments:

Although the US is carrying out air strikes against IS, Britain has not yet done so and Mr Cameron said any action in the region must be "properly thought through and patiently delivered".

He told the BBC that the UK was helping Kurds on the ground fighting IS with armaments and that it should look to "potentially training some of their forces".

He added that the UK should also make sure there was an Iraqi government in Baghdad that could represent "all of the country".

Analysis

Image copyright AP Image caption David Cameron and Barack Obama called the Islamic State group "barbaric killers"

By Norman Smith, BBC assistant political editor

No-one has yet asked Britain to join in air strikes - and no-one is expecting a decision to be taken at this summit.

But the conversation among Nato leaders has moved from "if" Britain and others should support US-led air strikes to "when". A timetable, it seems, will be determined by a key series of steps being met.

Step one - for neighbouring countries in the region to take a much more direct role in confronting Islamic State

Step two - for the new Iraqi government to demonstrate that it is a genuinely inclusive, non-sectarian government

Step three - for the Iraqi and Kurdish authorities to formally request Britain and others to become involved

It may still be weeks or months before such conditions are met. But the clock would now seem to have begun ticking down to British strikes against Islamic State.

National interests

A year ago, British MPs narrowly voted not to take military action against the regime of Syrian President Mr al-Assad, which was accused of using chemical weapons against its own people during the country's ongoing civil war. But the regime opposes IS, leading to calls for talks with Mr Assad.

When asked about the possibility of the UK taking military action against IS, Mr Cameron said: "I certainly don't rule anything out. We should pursue our national interests.

"The most important thing to consider is that we mustn't see this as something where you have a Western intervention over the heads of neighbouring states and leaving others to pick up the pieces."

Deputy Prime Minister Nick Clegg also said any consideration of air strikes would have to be part of a wider "jigsaw" of measures, to avoid a conflict deemed to be "the West versus the rest".

"Were any military component to be expanded upon, it's important to remember it has to be part of a wider approach, which hasn't been assembled yet," he said.