Our first move was to pass a law banning the military-style semiautomatic guns the terrorist used. That was the tangible weapon.

But the terrorist’s other weapon was live-streaming the attack on social media to spread his hateful vision and inspire fear. He wanted his chilling beliefs and actions to attract attention, and he chose social media as his tool.

We need to address this, too, to ensure that a terrorist attack like this never happens anywhere else. That is why I am leading, with President Emmanuel Macron of France, a gathering in Paris on Wednesday not just for politicians and heads of state but also the leaders of technology companies. We may have our differences, but none of us wants to see digital platforms used for terrorism.

Our aim may not be simple, but it is clearly focused: to end terrorist and violent extremist content online. This can succeed only if we collaborate.

Numerous world leaders have committed to going to Paris, and the tech industry says it is open to working more closely with us on this issue — and I hope they do. This is not about undermining or limiting freedom of speech. It is about these companies and how they operate.

I use Facebook, Instagram and occasionally Twitter. There’s no denying the power they have and the value they can provide. I’ll never forget a few days after the March 15 attack a group of high school students telling me how they had used social media to organize and gather in a public park in Christchurch to support their school friends who had been affected by the massacre.

Social media connects people. And so we must ensure that in our attempts to prevent harm that we do not compromise the integral pillar of society that is freedom of expression.