Barcelona protest
A woman holds a placard reading 'Som Sobirans' (We are sovereign) during a demonstration calling for Spain's interior minister Jorge Fernandez Diaz to resign in front of the headquarters of the delegation of the Spanish Government in Barcelona on 22 June 2016LLUIS GENE/AFP/Getty Images

Spanish Interior Minister Jorge Fernandez Diaz has refused to resign over leaked tapes that suggested he colluded with a top anti-fraud official to smear his political rivals. The controversy has erupted just ahead of Spanish general elections on Sunday, 26 June.

Hundreds of demonstrators carrying Catalan independence flags took to the streets of Barcelona on Wednesday (22 June) to demand Diaz's resignation.

In the leaked tapes, the minister could be heard discussing with the head of Catalonia's anti-fraud office, Daniel de Alfonso, investigations that could be launched against pro-independence politicians. The conversation was reportedly recorded in 2014, when a referendum vote was held by Catalonia for independence from Spain.

Police unions and opposition party leaders also called on Diaz to resign after the tapes were published on Spanish news website Publico.

Pablo Iglesias, head of the Podemos party, told the public broadcaster TVE, "We have an interior minister, who should be protecting us all, apparently using his post to investigate political rivals. I think this should trigger an immediate resignation."

However, Diaz told Spanish radio that the meeting did happen, "but as for the content of these conversations, I remember the general gist, which was to meet a magistrate that heads up the anti-fraud office of the regional government, whose mission is to fight fraud and corruption."

Calling the tapes "biased, out of context and edited", the minister also said that alleging that an interior minister is conspiring against members of Catalonia's government "is surreal".

Acting Prime Minister Mariano Rajoy said, "As we're four days before the end of the campaign, someone is trying to take advantage and fish in troubled waters to see what comes out."

Spain goes to polls for the second time in six months. The vote in December 2015 resulted in a hung parliament, after which parties failed to cobble together a coalition. Some polls have suggested that Diaz's Conservative Popular Party (PP) is set to win the biggest share of votes, but would still fall short of a majority to form the government.