Chile's Supreme Court has ordered the operator of two coal power plants to ensure the facilities do not pollute the oceans or kill marine life.
The judges sided with local fishermen and environmentalists in the Bio Bio region of central Chile.
They argued that the Bocamina power stations were sucking in crabs, sardines and other species and pumping out warm, contaminated water.
The two plants are operated by a subsidiary of Spain's Endesa.
The court ruled that the plants would be shut down if the company did not take sufficient measures to guarantee the protection of the region's environment.
"The company (Endesa Chile) can only operate Bocamina I and II if (...) water suction doesn't threaten nor harm species and hydrobiological resources, and strictly abides by its environmental license," it said in its ruling.
It added that, otherwise, "all corresponding measures have to be adopted, including the stopping of the facility until the faulty operations are repaired".
The court said that halting its operations was a decision for environmental state authorities, but it was not immediately clear how or when the local government would inspect the plants.
In a statement, Endesa Chile said it "has implemented a plan to eliminate the risk that organisms be sucked up".
"Authorities have been informed of the plan and the plants will be inspected in consequence," it continued.
In March of last year, thousands of dead prawns and dead crabs washed up on a beach in Coronel city near the plants, about 530km (330 miles) from the capital, Santiago.
An investigation was launched after fishermen linked the deaths to the operations of the power stations.
Bocamina is one of several energy and mining projects that has come under fire in recent years in Chile.
The country is trying to find a balance between the needs of its mining-dominated economy and environmental protection.