In Washington, David Cameron announces the creation of a joint group between the US and the UK to counter the rise of domestic violent extremism in the two countries

Barack Obama and David Cameron struck different notes on surveillance powers after the president conceded that there is an important balance to be struck between monitoring terror suspects and protecting civil liberties.

As Cameron warned the internet giants that they must do more to ensure they do not become platforms for terrorist communications, the US president said he welcomed the way in which civil liberties groups hold them to account by tapping them on the shoulder.

Obama agreed with the prime minister that there could be no spaces on the internet for terrorists to communicate that could not be monitored by the intelligences agencies, subject to proper oversight. But, unlike Cameron, the president encouraged groups to ensure that he and other leaders do not abandon civil liberties.

The prime minister adopted a harder stance on the need for big internet companies such as Facebook and Twitter to do more to cooperate with the surveillance of terror suspects. In an interview with Channel 4 News he said they had to be careful not to act as a communications platform for terrorists.

Cameron said: “These companies are run by good and sensible people, we’re having good and productive conversations. You’re absolutely right we’re not China. We have a very clear set of legal procedures. I’m not trying to go through a back door here. The companies themselves have all sorts of interests, but one of those interests is they don’t want to be the platform that becomes safe for terrorists to talk to each other and plan appalling outrages on. We saw with respect to the terrorist outrage on the streets of Woolwich that companies don’t want to play a role in bad things that can happen.”

Obama used the press conference to issue a plea to European countries not to “respond with a hammer” in the face of Islamist extremists as he called on the EU to follow the example of the US, which had successfully assimilated its Muslim populations.

In a sign of the concern in the US at the threat posed by extremists in Europe and in Syria and Iran, the president said disfranchised Muslims were one of the greatest challenges faced by Europe. “It is important for Europe not to respond with a hammer with law enforcement,” Obama said at a press conference with Cameron as he contrasted the way in which US Muslims had integrated and regarded themselves as wholly American.

The prime minister came close to challenging Obama’s view on integration when he said that some Muslims who had benefited from education in Britain and the EU had turned to extremism.

He said the greatest challenge lay in confronting the “poisonous ideology” that was warping the faith of Islam.

The White House press conference will be, despite the nuanced differences, a gift to the prime minister before the election. Obama came close to endorsing Cameron’s handling of the economy when he pointed out that the two countries were helping to lead the world recovery. He added, in a boost for the prime minister, that Britain and the US must be doing something right on the economy.

Cameron repaid the president for handing him helpful pre-election White House pictures in three ways. The prime minister:

• Telephoned three Republican senators, including the former presidential candidate John McCain, to express British concerns, shared by the White House and its European partners, about efforts in Congress to impose additional sanctions on Iran over its nuclear programme.

Cameron said there were fears that the sanctions could jeopardise the unity in the international “E3 + 3” talks – Britain, Germany, France plus the US, Russia and China – with Iran before the next deadline on 30 June.

The prime minister said at the press conference with Obama that new sanctions would be counter-productive. He added: “On Iran, we remain absolutely committed to ensuring that Iran cannot develop a nuclear weapon. The best way to achieve that now is to create the space for negotiations to succeed. “It is not to impose further sanctions now. That would be counter-productive and it could put at risk the international unity that has been so crucial to our approach. We also have to keep pace with new threats such as cyberattacks, and so we have agreed today to deepen our cyber security cooperation to better protect ourselves.”

• Announced that Britain would send more of its unmanned and unarmed Istar drones to help with the surveillance of Islamic State targets in Iraq. Their intelligence is fed back to help bombers carry out strikes.Britain is also to step up its work with Iraqi forces on tackling counter explosive devices. Britain will design and run the coalition’s training team on counter explosives in Iraq and will send 1,000 hand-held detectors.

• Pledged to dispatch an additional 1,000 troops to take part in Nato exercises in eastern Europe to discourage Russia from interfering in the Baltic states. Britain announced at the Nato summit in Wales last year that it would send 2,200 troops to take part in five exercises in the Baltic States, Germany and Bulgaria to ensure there was a “persistent presence” on Nato’s “eastern flank” without breaching treaties with Russia that prohibit permanent basing in some eastern European countries. This will now be extended to 3,200 UK troops and 300 vehicles.

The prime minister and president agreed to establish a joint UK-US group to look at ways of improving efforts to counter violent extremism. The work group, which will include Home Office representatives and other officials on the UK side, will meet before a White House summit on the issue next month. They will look at what drives radicalisation, how to work with local Muslim communities to see how they challenge radicals to promote moderate voices and how to manage the risk of foreign fighters.