The heavily polluted saltwater lagoon Mar Menor on the Spanish Mediterranean coast near Murcia is to become a legal entity with its own rights.
A large majority of lawmakers voted in favour of the move, according to a statement from Wednesday.
As soon as the legislative process is completed, any citizen - even if they are not affected themselves - will be able to appeal to the judiciary for a suspected violation of rights of the largest saltwater lagoon in Europe, according to the El Pais newspaper.
It is the first time in Europe that an ecosystem has been granted enforceable rights, the report said.
More than 615,000 people had signed a petition to trigger a legislative process.
The shallow Mar Menor lagoon is threatened mainly by intensive farming, with over-fertilization promoting algae growth.
Mass deaths of fish
Especially during heat waves, a lack of oxygen can cause mass deaths of fish and other aquatic animals.
This was most recently the case in August, when five tons of dead animals were pulled out of the water after days of 40-degree temperatures. As a result, 70,000 people formed a 73-kilometre-long human chain around the lagoon.
Granting the environment its own enforceable rights is a "revolution that will put limits on the current economic system that is destroying the planet," said University of Murcia philosophy professor Teresa Vicente.