Found in coastal regions around the world, seagrasses turn the ocean floor into an underwater meadow. Though mesmerizing to watch, these fields aren’t just for decoration. Seagrasses have several important environmental roles to play, such as providing essential habitat and sequestering carbon. Now, new research reveals another benefit: making seawater less polluted.

For the study, recently published in the journal Science, a team of scientists tested seawater off the coast of four small islands at Spermonde Archipelago, Indonesia. There, ocean pollution is common due to the lack of septic systems and effective waste disposal systems. They were on the hunt for Enterococcus, a type of bacteria that indicates that an area has been contaminated by fecal waste. Though the bacteria don’t always cause serious infections, they often indicate that other, even more harmful, pathogens are present.

They found that water samples from sites near beaches were more than ten times higher than Environmental Protection Agency recommended levels. Samples collected near seagrass meadows, however, had up to three times fewer bacteria. Similarly, they found that coral reefs located near seagrass meadows had up to two times less disease than those without grasses nearby.

That apparent bacteria-fighting power is just one of seagrasses’ many jobs. They play host to thousands of underwater species, making up vital habitats for animals, and generate oxygen through photosynthesis. They also serve as a snack for grazing sea animals such as green sea turtles. Seagrasses sequester carbon, too—it’s thought that they currently store nearly 20 billion tons of the gas. As a result, they’re considered one of Earth’s most valuable ecosystems. Now bacteria reduction can be added to that long list of benefits.

Drew Harvell, a professor of ecology and evolutionary biology from Cornell University and an author on the paper, has studied seagrass for years. But she didn’t start to suspect just how much it might be able to protect human health until 2011, when her entire team got sick with dysentery and, in one case, typhoid after investigating corals in the islands’ waters. “It was kind of the a-ha moment,” she tells Smithsonian.com. “The decision to really focus on studying the bacteria came from that event.”

Scientists have long suspected that seagrasses produce antibiotics, but the study is the first to connect seagrass presence with the health of marine organisms, including coral. And despite the role they apparently play in keeping oceans healthy, there’s a catch: As Smithsonian.com reported in 2014, they’re disappearing at the rate of rainforests.

Next, Harvell and her team will focus on how seagrass reduces bacteria. She suspects that the small sea creatures that live there and the fact that seagrass produces oxygen both play a role, but more research is needed. Along the way, they hope to use their research to raise awareness of the importance of seagrass—and to link a plant that couldn’t be further from most people’s minds with their long-term health. “A lot of marine ecosystems have benefits that we have vastly undervalued,” says Harvell. “We really need to get looking and working to find those positive solutions.”

Who knows? Perhaps the knowledge that sea grass is more than just an undersea decoration will prompt people to better protect it. There’s more work to be done, but for now it seems that the silent, shimmering grasses are protecting us whether we acknowledge it or not.