The case of a judge handing a Dutch woman a fine for urinating in public has sparked a sexism row.

Geerte Piening, 23, was fined €140 (£124) for peeing in an alleyway in Amsterdam two years ago. The fine was lowered to €90 (£80) because the case took so long to be heard.

Piening said she had no other choice as all the nearby bars and restaurants had closed. But the judge wasn't sympathetic and told her she should have used one of the men's urinals rather than deciding to urinate in public – an offence known as "wild peeing" in the Netherlands.

"A woman can also use a urinal – it might not be pleasant, but it is possible," the judge told her. The judge compared the offence to throwing litter on the street rather than in a bin, triggering a furious response on social media, with one commentator pointing out that someone could hold onto sweet wrappers and dispose of them at any point in a gender-neutral trash receptacle.

"Embarrassing" is the word Piening used to describe the lack of toilet facilities for women in Amsterdam.

"There are 35 public loos for men and two for women," she told Dutch newspaper Het Parool. "That's not right is it? Isn't it embarrassing for a tourist city like Amsterdam that women have nowhere to go?"

"In many other European cities there is a better system in place," she added. "I have been to Kiev in Ukraine where there are better facilities for women."

In the Netherlands, there are 565 public toilets, according to the app Hoge Nood, translated as 'Desperate Need.' A total of 204 are urinals, which cannot be used by women, according to newspaper De Volkskrant.

The judge acknowledged that there are fewer female public toilets, but said women are less likely to use them anyway. "You are only the second woman I've seen in court for this," he told Piening.

Peter Paul Ekker, a spokesman for Amsterdam's deputy mayor, told the BBC that there is no policy on the number of toilet facilities available for women in the capital.

"There are more men's than women's just because that's how it has happened," he said. "Obviously it should be equal and everyone will agree it can be done better, but what are the costs, is there space, and is it worth it?"

Hjalmar Duif, who works for Hoge Nood, said it costs hundreds of thousands of euros to build a public toilet for women, while an outdoor urinal costs between €40,000 and €80,000 on average.