BRATISLAVA (Reuters) - Slovakia’s general prosecutor on Tuesday ordered the release of 12 Greenpeace activists who were detained last week after climbing a tower during a protest at a coal mine that supplies one of the country’s most polluting power plants.

The order overturned the decision of a Slovak court on Sunday to keep the activists in custody until trial. That decision drew criticism from Prime Minister Peter Pellegrini, opposition parties and NGOs.

The 12 activists, from Slovakia, Czech Republic, Belgium and Finland, were charged with endangering a strategic utility, an offense that potentially carries a jail sentence.

“They should have never been sent to custody,” general prosecutor Jaromir Ciznar told reporters, adding the charges against them might be changed or dropped before the trial.No one was hurt during the protest but the mining company, Hornonitrianske Bane Prievidza (HBP), said 342 miners underground were put in danger as all operations at the premises were halted for several hours.