Spain’s Pedro Sánchez is taking on the world’s top tech billionaires and, for him, the fight is personal.

Two years after the Socialist leader contemplated stepping down to spare his loved ones from a barrage of abuse online, Sánchez is pushing through legislation to ban access to social media for under-16s and hold platform executives criminally responsible for illegal content.

“Social media, unfortunately, has become a kind of Wild West, a failed state,” the prime minister said in a video message on X. “A place that gives refuge to criminal activities, pornography, and violence.”

The determination with which Sánchez is pursuing the agenda puts Spain at the forefront of global efforts to curb the influence and impact of technology platforms and has put the country’s leader in the crosshairs of the world’s most powerful people.

Instead of avoiding direct confrontation with the likes of Elon Musk and Pavel Durov, Spain’s prime minister, whose family is routinely targeted by far-right trolls, is openly brawling with those he has derisively called “tech oligarchs.”

“It’s evident the endless attacks on him and even his loved ones affect Sánchez,” said Pablo Simón, a political scientist at Madrid’s Carlos III University.

“It’s led to a curious situation where it seems the government sometimes mixes [Sánchez’s] legitimate desire to defend his personal honor with the wider issue of regulating the online world and tamping down on hoaxes and disinformation.”

Red lines

Sánchez is far from alone as a target of constant, blistering online attacks, many of which are leveled by anonymous accounts. Still, research suggests the attacks against him are notably personal.

A 2022 study conducted by the Polytechnic University of Valencia found that one in every four of the 2,664 posts analyzed featured aggressive language or images that targeted Sánchez personally rather than his government’s policies.

Platforms like X are rife with posts alleging Sánchez’s wife, Begoña Gómez, is a transgender woman (a claim that has also been leveled at Brigitte Macron, the French first lady whose husband is similarly pushing for stricter regulation of social media).

Spain’s prime minister has acknowledged that “personal attacks have crossed many red lines,” and appeared to nearly crack under the strain in 2024, when he revealed he was thinking of resigning as a result of the constant abuse.

“Should I continue to lead this government or renounce this highest of honors?” the prime minister wrote at the time. “I urgently need to answer a question that I keep asking myself: Is it worth it for me to remain [in office] in spite of the right and far-right’s mudslinging?”

In response to Sánchez’s latest proposals to ban under-16s from social media platforms, Elon Musk called him a “true fascist totalitarian.” | Brendan Smialowski/AFP via Getty Images

His decision to stay was quickly followed by efforts to address the abuse, including a call for the Spanish parliament to tackle hoaxes and the misuse of artificial intelligence.

After tech billionaires, including Meta’s Mark Zuckerberg, attended Donald Trump’s second inauguration and X’s Musk launched the U.S. administration’s DOGE program in January 2025, Sánchez began to openly criticize the tech billionaires, whom he said were “undermining our democratic institutions” in exchange for political power.

In response to his latest proposals to ban under-16s from social media platforms, Musk called the Spaniard a “true fascist totalitarian.”

“Dirty Sánchez is a tyrant and traitor to the people of Spain,” the billionaire owner posted on X.

Will it work?

Sánchez’s fighting spirit won him applause in Brussels, where EU officials signaled support for his stance. Commission spokesperson Thomas Regnier said the institution has “full solidarity” with Sánchez and condemns “any attacks on the leaders of our member states.”

Yet while EU officials are delighted to have an ally in the bloc’s crusade to make the online world safer, Sánchez’s moves also illuminate confusion about legal jurisdiction, and the efforts have yet to translate into concrete results.

While Spain was among the first European countries to announce plans for an age verification app in July 2024, Madrid has yet to greenlight the tool’s release. A Digital Transformation Ministry spokesperson said the app is evolving into a broader digital identity tool that EU countries are expected to roll out at the end of 2026.

More recently, Spain has joined Greece and France in calling for an EU-wide ban on social media for children — a request Brussels is now considering. Sánchez’s specific proposal to ban kids under 16 from platforms is included in a draft law that is currently making its way through Spain’s fractured parliament.

If the legislation gets the green light at the national level, it would most likely be up to the European Commission to enforce this on sites such as Facebook and Instagram under the Digital Services Act. But how exactly the EU would ensure that no children in Spain access sites is unknown.

Many experts warn that a ban on minors’ access to social media is neither a good solution nor a realistic one. An age verification app would be needed to check users’ ages and then pass that information to online services, but kids can easily circumvent such measures.

That’s not the only criticism to contend with.

Following Sánchez’s announcements, the messaging application Telegram issued a blanket message to all users in Spain accusing the Socialist of attempting to turn the country “into a surveillance state under the guise of protection.” It said the rules “[open] doors to mass data collection,” lead to excessive censorship and suppress political opposition.

Rather than be cowed by critics like Telegram’s Pavel Durov, Sánchez has hit back. | AOP.Press/Corbis via Getty Images

Battling

But as for the ongoing war of words, rather than be cowed by critics like Musk and Telegram’s Durov, Sánchez hit back.

“Do we want a technology that normalizes and amplifies deception? That transforms privacy into a commodity? A society where a techno-oligarch can interfere, as one of them did yesterday, in the mobile phones of millions of citizens to tell them lies?” the prime minister asked last week. “The answer must be a clear no, and we will not give in.”

Political scientist Simón said Sánchez’s willingness to brawl with tech billionaires reflects a broader strategy to present the prime minister as a progressive leader on the global stage.

“It’s similar to his position in support of Gaza or against increases in military spending for NATO members,” he said. “It’s a foreign policy that is perfectly justified, but it also plays well at home, because Spaniards broadly resent the idea that these big tech companies are interfering with our democracies, generating disinformation and destabilizing them.”

Simón said the strategy has reinforced Sánchez’s standing among his electoral base. That’s important at a moment when the prime minister’s Socialist Party is being affected by corruption and sexual harassment scandals, as well as criticism for its handling of a recent train disaster and the longer-term management of the country’s railways.

Indeed, the fight with Musk and Durov appeared to provide Sánchez with a degree of combative joy last week, as his party faced regional elections in Aragón in which polls correctly predicted would be a bloodbath for the Socialists.

“Let the tech oligarchs bark, Sancho, it means we’re on the right track,” he wrote on X — a play on a celebrated line from Miguel de Cervantes’ novel Don Quixote that means the approach is vindicated by the criticism.