So Olympic officials have given up on cleaning the green-tinged water in one of the two pools at the Maria Lenk Aquatics Centre in Rio in favour of completely draining it – transferring nearly one million gallons of clear water from a nearby practice pool.

And it appears they finally have an explanation as to the dramatic change of colour in the water polo and the diving pools.

Gustavo Nascimento, director of venue management for Rio 2016, said hydrogen peroxide was the cause.

What the pools have looked like in the last few days (Matt Dunham/AP)

He blamed the contractor for mistakenly dumping 160 litres of hydrogen peroxide into the pools late last week, causing an adverse reaction when it mixed with chlorine.

Hydrogen peroxide is a de-chlorinating agent – which means it basically undoes all the good work chlorine is supposed to do in the pool like keep the water clear of algae and kill germs.

And it could explain the murkiness of the pools which only got worse as the days went by.

Green Rio pool water due to contractor adding hydrogen peroxide to water: organizer. Peroxide neutralized chlorine, allowed algae to bloom.

— CBC News Alerts (@CBCAlerts) August 13, 2016

The Olympic diving pool turned green because someone accidentally added hydrogen peroxide to it which neutralized the chlorine

— Jared Naude (@JaredNaude) August 14, 2016

This explanation comes after officials initially blamed the pool’s emerald colour on sunlight, lack of wind in the open-air aquatic centre and a “proliferation of algae”.

Meanwhile, Mario Andrada, a spokesman for Rio 2016, said the “radical measure” of draining the water polo pool (which is also the main swimming pool) was necessary to ensure clear water for both judges and competitors during an event that requires swimmers to spend much of their time underwater.

Workers drain murky water from the swimming pool (AP)

However, he reiterated that the kale-coloured water posed no risk to the health of the athletes although he admits the issue should have been resolved quicker.

“Of course it is an embarrassment because we are hosting the Olympic Games,” Andrada said.

“It should be light blue, transparent. We could have done better in fixing it quickly. We learned a painful lesson the hard way.”

The main thing is, the main swimming pool is back to being blue.

The diving pool has been restored to its original colour (Wong Maye-E/AP)

Hey the water in the Olympic diving pool is blue again, 󾌴󾌴

— Tony Ko (@IncredibleTKO) August 14, 2016

Omg the diving pool is BLUE again #PoolGate #Rio2016 #Olympics

— Katrina Protopapas (@DrKProto) August 14, 2016