In 2022 the Spanish parliament recognized the legal personhood of a lagoon called the Mar Menor, thus making it the first ecosystem in Europe with its own rights. This follows similar decisions in some other countries:
https://en.wikipedia.org/wiki/Rights_of_nature_law