Russia’s invasion of Ukraine dredged up concerns that the country’s aggression would extend to social media, and that the Kremlin’s long-running campaign to use the internet to stir doubt and division in democracies would confuse public opinion on the war.

Instead, social media has become an unexpectedly effective vehicle for galvanizing public opinion across many countries against Russian President Vladimir Putin’s actions, while at the same time silencing much of his propaganda.

In the five years since Russia meddled in the 2016 U.S. presidential election, companies including Facebook parent Meta Platforms Inc. and Twitter Inc. have built systems to ensure they wouldn’t be blindsided the next time. Their jobs were made easier by warnings from U.S. intelligence about the planned attack — making it more difficult for Putin to disseminate false pretexts for aggression — as well as directives from the European Union about banning Russian state media.