RIO DE JANEIRO — The International Olympic Committee said Sunday it will order testing for disease-causing viruses in the sewage-polluted waters where athletes will compete in next year’s Rio de Janeiro Games.

Before, the IOC and local Olympic organizers in Rio said they would only test for bacteria, as Brazil and virtually all nations only mandate such testing to determine the safety of recreational waters.

But after an Associated Press investigation published last week revealed high counts of viruses directly linked to human sewage in the Olympic waters, the IOC reversed course after being advised by the World Health Organization (WHO) that it should expand its testing.

“The WHO is saying they are recommending viral testing,” IOC medical director Dr. Richard Budgett told the AP. “We’ve always said we will follow the expert advice, so we will now be asking the appropriate authorities in Rio to follow the expert advice, which is for viral testing. We have to follow the best expert advice.”

On Saturday, the International Sailing Federation became the first to break with the IOC’s insistence on bacteria-only testing, saying it would do its own independent tests for viruses.

A five-month AP analysis of water at each of the venues where about 1,400 Olympic athletes will have contact with water showed dangerously high levels of viruses from sewage.