Viewers who tuned in to watch the women’s 10-meter synchronized platform final on August 9 were treated to a surprise: The water in the pool had turned an alarming shade of emerald green. Olympic officials blamed the discoloration on "a proliferation of algae caused by the heat and lack of wind," but, as New Scientist explains, the "perfect storm" of factors that led to the dramatic color change is actually a bit more complicated.

As anyone who has ever owned or been forced to clean a pool knows, chlorine keeps a lot of unwanted stuff from thriving in there—including algae. In the case of the Olympic pool, the chlorine appears to have failed at its job, and sunlight could be to blame. This is reportedly one of the first Olympics in recent history where the swimming events are being held outdoors. Under the direct heat of the sun, chlorine-based disinfectants can break down and evaporate, leaving water vulnerable to outside organisms.

However, this phenomenon alone doesn’t explain the algae problem. As spectators saw on Tuesday, the swimming pool provided a stark, sparklingly clear contrast to the diving pool just yards away. One crucial difference between the two pools was temperature. The diving pool is kept warmer, creating a more inviting atmosphere for life forms to grow. The diving pool is also much calmer than the swimming pool. The still water helps competitors target their dives, but it also means that chlorine circulates through the pool at a much slower rate.

Shortly after the incident, Rio spokesman Mario Andrada told AP that the pool would be back to its desired shade by the following day. The next day’s events have since started and the pool’s sickly hue has remained unchanged. In the meantime, the neighboring water polo pool is slowly turning green to match. Fortunately tests have deemed the waters safe to swim in.

[h/t New Scientist]