Theresa May has urged world leaders to do more to combat online extremism, saying the fight against so-called Islamic State is "moving from the battlefield to the internet".
At the G7 summit in Sicily, the PM said tech companies had to do more to identify and remove extreme material.
She also urged more action on tackling foreign fighters who travel to join IS.
Meanwhile, UK police have arrested another man in connection with Monday's terror attack in Manchester.
Twenty-two people were killed and 116 injured when a suicide bomber targeted an Ariana Grande concert in Manchester Arena on Monday evening.
BBC diplomatic correspondent James Landale said Mrs May had met the French president Emmanuel Macron at the summit and both agreed that the recent attacks in Manchester and Paris showed the need for greater cooperation.
Mrs May warned that fighters returning to their home countries from countries like Iraq and Syria posed a new terrorist threat and urged G7 members to work with "our partners in the region to step up returns and prosecutions of foreign fighters.
"This means improving intelligence sharing, evidence gathering and bolstering countries' police and legal processes," she said.
G7 members needed to be able to share data securely in order to track fighters as they cross borders and make decisions about whether to prosecute them, she said.
The PM also sought common ground on tackling online extremism as she chaired a counter-terrorism session at the summit in Italy, looking at how countries could work together to prevent online plotting of terrorist attacks and to stop the spread of extremist ideology.
The prime minister argued that, as IS militants lose ground in the Middle East, the threat was "evolving rather than disappearing" and that the industry had a "social responsibility" to do more to take down harmful content, arguing it had taken some action but had not gone far enough.
'Lift the lid'
She wants an international forum to develop the means of intervening where danger is detected, and for companies to develop tools which automatically identify and remove harmful material based on what it contains and who posted it.
French President Emmanuel Macron vowed France's total support for Britain's fight against terrorism as he met Mrs May at the summit.
"We will be here to cooperate and do everything we can in order to increase this cooperation at the European level, in order to do more from a bilateral point of view against terrorism," he told her, in their first formal meeting since he took office.
Security minister Ben Wallace told BBC Radio 4's Today programme that the use of online communications was "one of the biggest challenges" in the fight against terrorism, with encryption making it "almost impossible for us to actually lift the lid on these people".
"And the scale of it is not just the UK, it is across the whole of Europe, across the world."
He said the giant American tech companies like Facebook and Google could be doing more.
"We are determined to not let these people off the hook with the responsibility they have in broadcasting some horrendous [material], not only manuals about how to make bombs, but also grooming materials," he said.
"We all think they could all do more... we need to have the tools to make them, where we need to, remove material quicker."
Google said it was committed to creating an international forum designed to tackle extreme content online, to make sure "terrorists do not have a voice online".
"We employ thousands of people and invest hundreds of millions of pounds to fight abuse on our platforms, and will continue investing and adapting to ensure we are part of the solution to addressing these challenges," it added.