The internet and social media have revolutionized the way everyone communicates, mostly for the better. But this epic change also has created unparalleled opportunities for terrorist groups to spread their propaganda, entice recruits and plan attacks — all in the darkest corners of the internet, protected by the very freedoms that form a foundation of American democracy.

Terrorists and would-be terrorists have learned to use the internet in two ways: Groups like the Islamic State in Iraq and the Levant (ISIL) have units devoted to developing their presence on social media, sending out dozens of videos daily. Apps such as Telegram, based in Germany, offer heavily encrypted communications, self-destructing messages, and the ability to do secure fundraising, send large documents, and communicate in remote locations with little more than a smartphone and a laptop.

In April, Hamza Naj Ahmed told a federal judge that social media messaging convinced him that ISIL was “helping the innocent people, similar to government organizations.” Ahmed was one of six defendants to plead guilty in the yearlong investigation into recruitment of young Somali-Americans from the Twin Cities. Three others went to trial and were convicted of conspiring to support a foreign terrorist organization and to commit murder abroad under its command. Then there are individuals, such as Orlando shooter Omar Mateen, who use social media as their real-time stage. Mateen first made sure he called 911 and proclaimed himself a “soldier of ISIS” (a fact that was scrubbed from initial transcripts of the call) and then proceeded to check Facebook’s chronicling of his mass slaughter even as he was committing it. In the days leading up to the massacre, he was scanning the internet for information about terrorist acts.

Both of these developments signal an urgent need for some guardrails that protect Americans’ most cherished right — that of free speech — while preventing terrorists from using those freedoms against us. Yes, the terrain here will be tricky to navigate. And yet, it is shocking how little has been done on this front so many years into what used to be called the Global War on Terror.

The White House met with social media and tech giants both in January and February, but tensions remain and little of consequence has emerged. Facebook has said it already flags and removes content that is reported as potentially terror-related. Twitter also has shut down accounts. But that has yet to stem extremists’ use of those and other social media outlets. And it was not enough to stop Mateen, some time on the day of the attack, from posting a chilling diatribe that said in part: “The real Muslims will never accept the filthy ways of the west … You kill innocent women and children by doing us airstrikes. now taste the Islamic state vengeance … In the next few days you will see attacks from the Islamic state in the usa.”

Government and U.S. technology companies must find ways to collaborate more effectively in the face of a common enemy. No one wants strict government control of internet communications, as exists in China. Yet, particularly here in Minnesota, that social media recruitment of would-be jihadists is real and deadly serious. There must be a serious, unflinching commitment — with compromises on both sides — that forges a more-effective set of guidelines to limit terrorists’ ability to manipulate and corrupt through social media. Americans cannot allow the commitment to free speech to render us helpless from putting up reasonable barriers to those who would do us harm.

But this problem also goes well beyond U.S. borders. That’s why U.S. leaders should call for an international summit specifically on social media and terrorism. The most popular darknet sites and apps are being born and maintained in the more technologically advanced countries. If such summits can be held for climate change and entrepreneurism, surely one can be created that would help this country and its allies more effectively track and analyze terrorist posts and map jihadist networks with an eye toward shutting them down.