The fight against Islamic extremism is akin to a new Cold War, David Cameron has said in sombre exchanges at Prime Minister's Questions.

After opening the first questions session since the summer recess with a statement condemning the "sickening and brutal" murder of US journalist Steven Sotloff, Mr Cameron was backed by Labour leader Ed Miliband.

And answering questions, Mr Cameron said: "It is not enough to target those who preach violent extremism - we need to go after those that promote the extremist narrative and life view that gives the terrorists and the men of violence support for what they do.

"It is not unlike the Cold War, where we did not just pursue those who wanted to do us such harm, we also had to challenge all those who gave them succour.

"That is what we need to do in a struggle which, as I have said, I think will last for decades. We need to show resilience and, as you said, unity in pursuing it."

Mr Miliband opened his questioning by saying he joined the "universal sense of revulsion" at the killing of Mr Sotloff and he shared "deep concern" for the British hostage.

He said: "This will be a terrible time for his family and people across the country will be thinking of them.

"This is a pattern of murderous behaviour by Isil (IS) of the innocent. Christians, Yazidis, Muslims, anyone who does not agree with their vile ideology.

"Events like this must strengthen, not weake,n our resolve to defeat them and you can be assured of our full support in standing firm against them."

Mr Cameron said it was vital for the Commons to send a "united message" to Isil, the Government's preferred term for the group in Syria and northern Iraq which labels itself Islamic State (IS).

He said: "I think what has happened to the two hostages so far and what may happen again in the future is utterly abhorrent and barbaric. These people need to understand we will not waver in the our aim of defeating terrorism.

"That is not something that divides this House politically, it is something that everyone - and I suspect the entirety of our country - agrees with."

Mr Miliband said the United Nations was vital to build a legitimate and effective alliance against IS.

And he questioned how Mr Cameron would use the UK's chairmanship of the UN Security Council to build an international consensus.

Mr Cameron replied: "So far, we have used the United Nations to put pressure on Isil by making clear people should not be providing resources or sanctuary to these people. Indeed, they should be cut off.

"But we have the opportunity, through the UN, to marshal international support and backing for the view this Isil so-called Islamic caliphate is unacceptable and needs to be squeezed out of existence. That is what we should do and we should aim to get the maximum support through the UN for the measures right across the board that are being taken."

The Labour leader turned to the domestic security announcements made by the Prime Minister on Monday and said he backed proposals to increase powers to relocate terror suspects.

He said: "Can you confirm this will go ahead and can you give an indication of the timetable for bringing these powers forward?"

Mr Cameron replied: "I can confirm it will go ahead. It is going to require legislation and the key is, I think, to put the desires and advice of David Anderson, who is the independent reviewer of terrorism (legislation), to put those into action.

"What he has spoken about is some combination of exclusion and relocation. It is that which needs to be... introduced into the terrorism and investigatory measures.

"I think we should try and do this on a cross-party basis to send the clearest possible message. I think urgency is the order of the day."

Mr Miliband followed up by pressing the Prime Minister on his proposal to exclude British citizens who have fought abroad.

He said: "The best way to deal with terrorists is, of course, prosecution and where that is not possible, restrictions on their activities and movements.

"On Monday, you also proposed the possibility of blocking British citizens from returning to the UK. Given there has been some doubt cast on this, can you say more about whether you believe this is legally permissible and again whether there are plans to take this forward?"

Mr Cameron replied: "The short answer is I do believe it is legally permissible but it is going to take some work.

"We already have the power when people are trying to return to the United Kingdom. If it is a foreign national, we can exclude them even if they have lived in this country for any number of years. If it is a dual national, you can strip them of their British citizenship and exclude them from the country. If it is a naturalised Britain you can, under new laws passed recently, you can strip them of their British nationality.

"But I do believe there is a gap where you have someone born, raised and a British citizen... of course, the best thing to do is to gather evidence, prosecute, convict and imprison.

"But I believe there may be occasions when we need to exclude and so we should fill that gap in our armoury. I believe it is legal and possible to do it."

Mr Miliband concluded his questioning by proposing a strengthening of the Prevent programme, aimed at de-radicalising people.

He said: "After all, that is essential to stop people being indoctrinated into this poisonous ideology."

And he added: "We do need swift action to build alliances across the world against Isil and strong and considered action here at home.

"It's what the world needs, it's what the British people expect and in pursuing this course you will have our full support."

On Prevent, Mr Cameron said: "What we have done is try and divide up the different elements of it. There is one part which is about community cohesion which is best led on by the Department of Communities and Local Government.

"The other part, best run by the Home Office, through the Prevent programme."