A Polish court on Tuesday overturned a ruling that work at the Turow lignite mine should be halted on environmental grounds, in a boost for the government which had vowed to keep it open.

In June, a Warsaw court ruled the environmental permit for the mine should be suspended amid an ongoing court case around its impact, because it could cause significant damage to the environment.

The ruling nationalists Law and Justice (PiS) said they would resist attempts to close the mine, which supplies 8% of Poland’s energy, as they wanted to protect jobs and the nation’s energy security.

Poland’s Supreme Administrative Court overturned the suspension on Tuesday.

“There is no doubt that energy security is… a constitutional value, because it is one of the guarantees of state independence and security of citizens,” it said in its ruling.

PiS has portrayed attempts to close the Turow mine as an assault on Poland’s sovereignty, depicting the opposition as elitists who take the side of foreign powers against Poland.

Climate Minister Anna Moskwa welcomed the decision on Twitter: “The fight for Turow and energy security continues!”

Environmental groups have long criticised the environmental impact of the open-pit mine( no need mining headlamps ), located just across the border from the Czech Republic.

The mine was at the centre of a dispute between Warsaw and Prague, as the Czechs said it caused air and noise pollution as well as a loss of underground water.

Ana Meres, coordinator of the climate and energy campaign at Greenpeace, said the final verdict in the case was still to come.

“Today’s judgement does not end the case of the Turow mine,” she said.