MADRID (Reuters) - Spanish magistrates demanded on Monday that the justice minister resign after he criticized a judge in a gang rape case that has brought thousands of angry demonstrators onto the streets of cities across the country.

A court in Navarra in northern Spain on Thursday cleared five men of raping a teenager at the 2016 San Fermin bull-running festival in Pamplona, convicting them instead of the lesser crime of sexual abuse.

The decision caused a national outcry and protests took place in the following days in Pamplona, Madrid and elsewhere, with demonstrators carrying placards saying “It is not abuse, it is rape”.

Justice Minister Rafael Catala was asked during an interview with COPE radio station on Monday whether one of the three judges, Ricardo Javier Gonzalez, who had argued for acquitting the men, should be disciplined.

“When everyone knows that someone has a problem...and this produces odd results, I think this could have been avoided,” Catala said.

Seven associations of lawyers and judges called in a joint statement for him to resign, describing the comments as “audacious for someone who acts as Minister of Justice”.

The so-called “Wolf Pack” case, named after the Whatsapp group on which the men later joked about the incident, drew condemnation from many civil organizations and political parties. State prosecutors said they would appeal.

In Spanish law, the crime of sexual aggression or rape includes specific violence, such as threatening the victim with a knife or dealing physical blows. The five were given nine-year prison sentences instead of the 22 years the prosecution had sought.

The government said last week that Catala will consult with its legal advisers to decide whether the classification of sexual crimes, which dates from 1995, should be updated.