The men, in their late twenties, had been accused of raping a woman, then 18, at the entrance to an apartment building in Pamplona on July 7, 2016, at the start of the week-long San Fermin festival, which draws tens of thousands of visitors.
They took a video of the incident with their smartphones and then bragged about it on a WhatsApp messaging group where they referred to themselves as "La Manada", or "The Pack" in English.
The men were acquitted of sexual assault, which includes rape, but sentenced to nine years for the lesser offence of sexual abuse, which under Spanish law implies there was no violence or intimidation.
- FOCUS: Gang rape acquittal fires up huge crowds in Spain
- As it happened: Spain expresses outrage as 'wolf pack' aggressors given only nine-year sentence
- LISTEN: How a gang rape at San Fermin made Spaniards stand up for a woman's right to be believed
A woman shouts slogans during a demonstration in Madrid on April 26. Photo: Gabriel Bouys/AFP
One of the three judges had argued that the men should be fully acquitted.
"I've been told he's someone who has previously been given sanctions, who has a problem," Justice Minister Rafael Catala told Spanish radio on Monday.
But he acknowledged he did not know "in detail" what the judge is accused of.
His comments caused outrage among magistrates in Spain.
"To comment on whether a magistrate is competent or not is reckless for a justice minister," seven judges and prosecutors' associations said in a joint statement.
"Today it's for 'The Pack' trial but tomorrow it could be for any act that is not of the minister's or the government's liking.
"That's why we demand... the resignation of the justice minister."
In a statement, the CGPJ, the powerful body that appoints judges in Spain, said it was essential to "avoid the political use of the judiciary or questioning the independence, impartiality and professionalism of judges and
The verdict, which prosecutors have said they will appeal, has grabbed headlines of newspapers all around Spain.
The case touched off a wave of protests and led the conservative government to say it will consider changing rape laws.
A petition asking for the three magistrates in the case to be dismissed has garnered 1.3 million signatures.
Spanish women have also started recounting their experiences of sexual assault on social networks with the hashtag #Cuentalo ("Say it" in English), joining the global #MeToo movement against sexual abuse and harassment.