The US President said the killing of kidnapped American reporter James Foley by Islamic State (IS) extremists was “hateful”, while Mr Cameron branded it “brutal and barbaric”.
Both leaders insisted the act would not force them to back away from tackling the group in Iraq and Syria.
Mr Cameron cut short his holiday to return to Downing Street and oversee the response after the horrific video was posted online.
Speaking to reporters at Number 10, Mr Cameron said it seemed “increasingly likely” that a British citizen was the killer.
“Let me condemn the barbaric and brutal act that has taken place and let’s be clear what this act is – it is an act of murder, and murder without any justification,” he said.
“We have not identified the individual responsible, but from what we have seen it looks increasingly likely that it is a British citizen. This is deeply shocking. But we know that far too many British citizens have travelled to Iraq and travelled to Syria to take part in extremism and violence.
“And what we must do is redouble all our efforts to stop people from going. To take away the passports of those contemplating travel, arrest and prosecute those who take part in this extremism and violence. To take extremist material off the internet and do everything we can to keep our people safe. ”
Mr Obama said IS would fail as they only want to destroy, adding: “One thing we can all agree on is that Isil has no place in the 21st century.”
The President added: “Governments and peoples across the Middle East, there has to be a common effort to extract this (IS) cancer so that it does not spread.”
“No just God would stand for what they did yesterday or what they do every single day,” he said.
“We will continue to confront this hateful terrorism and replace it with a sense of hope and stability.
“That’s what Jim Foley stood for. A man who lived his work, who courageously told the stories of his fellow human beings and who was liked and loved by friends and family.”
The film shows Mr Foley, 40, who worked for organisations including Agence France-Presse and went missing in Syria in 2012, kneeling in a desert-like environment at an unknown location, with an IS fighter standing by his side with his face covered.
Pausing and taking deep breaths, the distraught journalist said he wanted to call on family and friends to “rise up against my real killers, the US government”, as the IS fighter stood next to him brandishing a knife.
Speaking with an apparent English accent, the killer accused America of “aggression towards the Islamic state”, adding: “You have plotted against us and gone far out of your way to find reasons to interfere in our affairs.”
He said further actions in Iraq by America “will result in the bloodshed of your people”.
Another journalist, Steven Sotloff, who went missing near the border of Syria and Turkey last year, is also seen.
The IS fighter warns his life depends on President Obama’s “next decision”.
The killer is referred to as “John” in the footage and a former hostage, who was held for a year, has said the man was the ringleader of a trio of British-born extremists that those being held had nicknamed ‘The Beatles’, owing to their nationality.
Scotland Yard has urged people not to share the video through Twitter or Facebook as it could be a criminal offence.
MUSLIM COUNCIL SHARES OUTRAGE
The Muslim Council of Britain has said it condemns the “abhorrent” actions of the Islamic State (IS).
A spokesman said: “We express once again our rebuke of this reprehensible organisation.
“We are horrified at the abhorrent murder of James Foley [...] Isis has murdered this man for no reason at all.”
He added: “We condemn unreservedly their psychopathic violence, whether it is on minorities, on civilians, or on fellow Muslims.
“Isis does not speak for Islam, and has been repudiated by all Muslims.”