Facebook has taken down several networks that were spreading far-right content to nearly 1.7 million people in Spain, days before national elections that are expected to see a surge in support for the far-right Vox party.

The networks were uncovered in an investigation by the campaign group Avaaz, and taken down only after it presented Facebook with its findings.

The discovery of a large network, spreading politically sensitive content unmonitored days before a key European election, is likely to add to concerns about social media firms’ willingness and ability to control hate speech and criminal activity on their sites.

On Wednesday British MPs condemned Facebook, Google and Twitter for their refusal to report users to the police when they remove criminal posts, except in rare cases when there is an immediate threat to life or limb.

Quick Guide Spain general election Show Spain will go to the polls for the third time in under four years on 28 April after the country’s socialist prime minister Pedro Sánchez called a snap election. Sánchez announced the vote after Catalan pro-independence parties joined right-wing parties in rejecting the government’s 2019 budget. The Spanish Socialist Workers’ party (PSOE) has governed Spain since last June, when it used a vote of no-confidence to throw the corruption-mired, conservative People’s party (PP) out of office. But Sánchez has struggled to achieve an ambitious agenda – including the exhumation of Franco – as he has headed a minority government, holding only 84 of the 350 seats in the Spanish congress. The PSOE’s opponents accuse it of being weak and too reliant on the separatist Catalan parties that helped usher it into power. Polls suggest that the PSOE will take the most votes but will fall short of a majority. However, it could profit from the fragmentation of the Spanish right following the emergence of Vox. The PP leader, Pablo Casado, has dragged the party much further to the right in the hope of seeing off the challenge from Vox. The centre-right Citizens party has also shifted further to the right in recent months, and made the Catalan crisis a key focus. Its tough line on regional independence and rigorous defence of Spain’s national unity paid off in the 2017 Catalan regional elections, in which Citizens was the single biggest winner. Its leader, Albert Rivera, has vetoed a coalition with the PSOE, although many observers suspect he could rethink that position in the post-electoral horse-trading. Podemos, which, like Citizens, achieved a breakthrough in the 2015 election, ending decades of PSOE and PP duopoly, has lost momentum in recent years. The anti-austerity party, born of frustration and the indignados movement, looked set to leapfrog the PSOE and become the dominant leftwing political force in the 2016 general election. But mixed messages, internal rifts and an alliance with the United Left saw it do far worse than expected. Podemos has helped to shore up the Sánchez government, but very public internal spats have blunted its message and weakened its image.- Photograph: Jean Catuffe/Getty Images Europe

Avaaz found that the networks in Spain were spreading fake news, including a doctored photo of a political opponent giving a Hitler salute, and misogynist, Islamophobic and homophobic messages. They were also coordinating the publication of identical posts apparently designed to look like spontaneous messages.

However, unlike its decision earlier this month to ban British far-right groups in a crackdown on hate organisations, Facebook said it had not taken down the Spanish pages because of their content, or for “coordinated inauthentic behaviour” – the network’s sanitised term for manufacturing and spreading fake news.

Instead, Facebook said they were targeted for breaking network rules. “We have removed a number of fake and duplicate accounts that were violating our authenticity policies, as well as one page for name change violations,” a Facebook spokesperson said. “We aren’t removing accounts or pages for coordinated inauthentic behaviour.

“As in other cases, we removed these accounts based on their behaviour, not the content they posted. Some additional pages were also disabled because they were administered solely by fake accounts.”

The largest network – Unidad Nacional Española (UNE) – had more than 1.2 million followers, and others reached hundreds of thousands more. Together they had more than 7 million interactions, at a time of intense political activity and focus on the political rise of the upstart far-right party Vox.

Spain’s apparent immunity to far-right politics finally wore off in December last year, when Vox dramatically exceeded expectations to take 12 seats in the Andalucían regional election, then cemented its power by backing a regional coalition between the conservative People’s party (PP) and the centre-right Citizens party.

Founded by disenchanted members of the PP six years ago, Vox is expected to achieve its national breakthrough in Sunday’s general election. Polls show it could pick up around 11% of the vote, making it the first far-right party to win more than a single seat in parliament since Spain’s return to democracy following the death of General Franco in 1975.

The Spanish government recently embarked on its own effort to protect both Sunday’s general election and the European polls next month.

The initiative, intended to guard against cyber-attacks and fake news, is described as “a series of preventative, reactive and co-ordinated cybersecurity measures, designed to guarantee the free exercise of rights and freedoms related to electoral processes”. However, it did not appear to have picked up on the Facebook networks tracked by Avaaz.