Rome (CNN) Hundreds of demonstrators protested outside an Italian court this week after it emerged that two men were acquitted of rape partly because the judges believed the alleged victim looked too "masculine."

In 2016, the two Peruvian men were convicted of raping a woman in the Italian city of Ancona in 2015.

The woman, who cannot be named for legal reasons, was 20 years old at the time of the alleged attack and is also of Peruvian origin.

The ruling was subsequently thrown out by the Ancona appeals court, with the judges -- three women -- claiming that the woman's report was not credible, despite doctors confirming that her injuries were consistent with rape.

"It's a sentence that has shocked us, I was astonished when reading the motivation," Cinzia Molinaro, the woman's lawyer, told CNN.

The reasons behind the acquittal only emerged when the Italian supreme court annulled the verdict.

Molinaro said the judges overturned the initial ruling with a 22-page reasoning, claiming that the woman's account of the incident was not reliable as the men "didn't find her attractive, she was too masculine."

The judges added that one of the defendants had saved the woman's number in his phone as "Viking," and stated that the "photograph present in her file would appear to confirm this."

They also ruled that it was "not possible to exclude the possibility that it was" in fact the woman who had "organized the 'exuberant' evening."

The alleged victim claimed she was raped in a park in Ancona on March 9, 2015 by a man who was known to her, while another stood guard.

"That night she returned home and went to hospital only the day after," Molinaro said. "Doctors in A&E had to put 14 stitches in her vagina."

The woman subsequently reported the rape to police and was "very honest" in her account, Molinaro said.

"She had confused memories of what exactly happened during the night because she was drugged," Molinaro said, adding that doctors had confirmed that traces of a "date rape" drug, were found in her blood.

"I don't remember how it all started, but I remember I shouted 'enough, enough'," Molinaro reported the girl as saying to the police.

The woman was subsequently forced to return to Peru with her mother, as she "couldn't stand the burden, she felt like the accused," Molinaro said. She added that Ancona is a relatively small town and the Peruvian community is very close-knit.

One of the defendants was initially sentenced to five years in prison in 2016 for the rape, while the other was sentenced to three years for standing guard. The ruling was subsequently overturned in 2017.

The reasons behind the acquittal only emerged last week, when the Italian supreme court annulled the appeal verdict and ordered a retrial. The case will now be reheard from scratch at a court in Perugia on a date to be confirmed.

The revelation of the reasons for the acquittal sparked outrage among women's rights organizations and trade unions, which organized a protest in front of the Ancona appeals court Monday.

"It is an outrage that it is still female victims of violence who are judged, rather than the authors of the violence," a local branch of the CGIL trade union wrote on Twitter.

Protesters carried placards bearing the slogan: "Stop justifying male violence on women."

The Italian justice minister has subsequently opened an investigation into the Ancona appeals court ruling, according to the Ansa news agency.