A climate lawsuit by Peruvian farmer and mountain guide Saul Luciano Lliuya against energy company RWE was dismissed by Essen district court, Germany, on Thursday.

Lliuya’s village of Huaraz in the Andes is in the path of a potential floodwave. A chunk of glacier could break off at any time and fall into Palcacocha meltwater lake, which has grown fourfold since 2003 under global warming.

He was seeking €17,000 from RWE towards a dam to protect up to 50,000 people at risk, in light of the utility’s historic contribution to greenhouse gas emissions.

But the judge ruled that while there was “scientific causality”, his lawyer Roda Verheyen had not demonstrated “legal causality”. In other words, the court was not convinced RWE was legally responsible for protecting Huaraz, despite evidence that its activities had contributed to the town’s predicament.

Undeterred, Verheyen said her client would “most likely appeal” to Hamm regional court, subject to scrutinising the written verdict.

Lliuya was philosophical: “As mountain guides we are used to travelling up long and rocky roads. Obstacles like this shouldn’t discourage us. This is about safety and justice for my family and thousands of other people in Huaraz. I’m still hopeful that a German court will give us the chance to show that RWE has contributed to this dangerous situation.”

The compensation sought is symbolic. It represents 0.47% of the estimated cost of flood defences for the town – RWE’s share of global emissions from 1751 to 2010.

Foundation for Sustainability has already paid €80,000 worth of legal costs and is prepared to raise more, according to the chair of NGO Germanwatch, which is providing advice and support.

“The question here is whether the main contributors to climate change can get out of their responsibility because there are many other contributors,” said Klaus Milke.

“That would mean that people affected by climate change cannot receive support and have no rights. It would be an argument for collective irresponsibility.”

The legal challenge, launched in December 2015, tests the boundaries of the “polluter pays” principle. If successful on appeal, it could inspire a wave of similar claims.

A spokesperson for RWE said Thursday’s judgment vindicated the company’s arguments: “Due to a world-wide variety of greenhouse gas emissions from natural and anthropological sources, the complexity of the climate as well as its natural variability, in RWE’s opinion it is not possible to attribute specific effects of change in the climate to just one emitter.”

The company also highlighted its moves to reduce emissions by modernising its fossil fuel power fleet and investing in renewable energy.