Meta and TikTok have agreed to fact-check content about Spain’s border crossings, a voluntary commitment brokered by Brussels after a catastrophe that showed how quickly a viral video can turn into a matter of life and death.

The accord follows the events of 30 July, when more than 70,000 migrants surged towards Ceuta, the Spanish enclave that borders Morocco, and nearly 100 people died trying to make the crossing.

Viral clips spread false claims that the border was open or easily breached, and among the footage circulating was material from a Spanish news outlet, originally intended to highlight the pressures of migration, which was stripped of its context and repurposed to encourage people to attempt the journey.

It is a grim illustration of a problem regulators have wrestled with for years, from disinformation campaigns to the way platforms surface content, and one the EU has increasingly treated as TikTok’s to answer for, having already charged the app with failing to protect children under the Digital Services Act.

The deal was announced by Henna Virkkunen, the EU’s tech chief, with Spain’s digital economy minister, Oscar Lopez, involved in the prevention talks.