Image copyright EPA Image caption Banners saying "trial against defendants, not against the victim" are held at a rally in Pamplona

Feminists and legal observers in Spain have expressed outrage at what they see as "patriarchal justice" during the trial of five men accused of gang raping an 18-year-old woman during Pamplona's San Fermín bull-running festival in 2016.

The judge, who will consider his verdict after Tuesday's final hearing, has come under fire over his decisions to allow evidence to be presented about the alleged victim's personal life and character, while not permitting the inclusion of texted conversations between the accused in which they apparently discuss plans to rape women.

Searching through conversations in the WhatsApp group called "La manada", or "wolf pack", to which the men belonged, police investigators came across an incident in which video showed some of the individuals apparently abusing another woman, who seemed to be unconscious.

Conversations prior to their journey from Seville to Pamplona mention the need to procure date rape drugs and ropes, "because when we get there, we'll want to rape everything we set eyes on".

A private detective's report, commissioned by one of the accused, was compiled by spying on the alleged victim in the aftermath of the alleged attack, including her activity on social media and a holiday with friends. Two weeks into the trial, the defence decided to withdraw the file as evidence.

The strategy of the defence has been based on an attempt to show that the woman consented to group sex with all five of them. They are men in their late 20s, including a Civil Guard police officer who is also accused of stealing the female student's mobile phone immediately after the incident. If found guilty, the men face prison terms of up to 25 years.

Image copyright AFP Image caption Message in 2016 protesting against sexual assaults during the Pamplona festival

"In this trial, it seems that what is being judged is not the crimes, but this woman's honour," says Amalia Fernández, president of Themis, a Spanish organisation of women jurists.

Criticising the judge's decision to include the detective's report and media debates over whether the alleged victim had been truthful in describing the late-night encounter with the men as rape, Ms Fernández sees evidence of a systematic bias against women.

It seems that what is being judged is not the crimes, but this woman's honour

"We live in a society with patriarchal attitudes. Courts reflect society leading to a double victimisation as in this case. In crimes against women, the victim is turned into a suspect, something that never happens to complainants in other crimes."

Ms Fernández questions how the judge could have considered a private detective's report on the student from Madrid to be of any value in evaluating her level of trauma, while describing the material from the accused's WhatsApp conversations as irrelevant in terms of their "preparations" for the alleged crime.

She also criticises the fact that the accused were not cross-examined until the end of the trial after hearing all the other evidence and the testimony of the alleged victim, an extremely rare exception to the norm in Spanish trials in which defendants are put on the stand first.

Image copyright EPA Image caption The trial has been closely followed in Spain

When the five men finally gave evidence, women protestors could be heard outside the Pamplona courthouse shouting slogans including "No means no".

Media reporting, focusing heavily on the alleged victim's credibility, has been criticised. In one instance, a major TV network ran a poll on Twitter asking the public if they believed it was a rape or consensual sex.

Videos of the late-night encounter between the men and the young woman from Madrid show how they wandered the streets among other drunken revellers before two of the men led her into the basement block of flats by the hand.

According to the police report on the case, the men surrounded the teenager in a small alcove, removed her clothes and had unprotected penetrative sex.

Image copyright EPA Image caption The five accused of the alleged gang rape are in jail

The men sent WhatsApp messages to friends celebrating the sex act, and promised to share videos they took on their phones. Those videos have been examined by the court frame by frame.

The police report on the videos says that the alleged victim maintains a "passive or neutral" attitude throughout the scene, keeping her eyes closed at all times.

"I just wanted it to finish as soon as possible," she said on the witness stand.

The woman was found in a reportedly distraught state by a couple in the street outside the scene of the alleged crime. She told the court she is still having psychological treatment to deal with trauma from the alleged attack.