Athletes competing in next year’s Summer Olympics in Rio de Janeiro will be swimming and boating in waters so contaminated with human feces that they risk becoming violently ill and unable to compete in the games, an Associated Press investigation has found.

An AP analysis of water quality revealed dangerously high levels of viruses and bacteria from human sewage in Olympic and Paralympic venues — results that alarmed international experts and dismayed competitors training in Rio, some of whom have already fallen ill with fevers, vomiting, and diarrhea.

It is the first independent comprehensive testing for both viruses and bacteria at the Olympic sites.

Brazilian officials have assured that the water will be safe for the Olympic athletes. But the government does not test for viruses. Extreme water pollution is common in Brazil, where most sewage is not treated. Raw waste runs through open-air ditches to streams and rivers that feed the Olympic water sites. As a result, Olympic athletes are almost certain to come into contact with disease-causing viruses that in some tests measured up to 1.7 million times the level of what would be considered hazardous on a Southern California beach.

Despite decades of official pledges to clean up the mess, the stench of raw sewage still greets travelers touching down at Rio’s international airport. Prime beaches are deserted because the surf is thick with putrid sludge, and periodic die-offs leave the Olympic lake, Rodrigo de Freitas, littered with rotting fish.

“What you have there is basically raw sewage,” said John Griffith, a marine biologist at the Southern California Coastal Water Research Project. Griffith examined the protocols, methodology, and results of the AP tests.

“It’s all the water from the toilets and the showers and whatever people put down their sinks, all mixed up, and it’s going out into the beach waters. Those kinds of things would be shut down immediately if found here,” he said, referring to the US.

Vera Oliveira, head of water monitoring for Rio’s municipal environmental secretariat, said officials were not testing viral levels at the Olympic lake, the water quality of which is the city’s responsibility.

The other Olympic water venues are under the control of the Rio state environmental agency. Leonardo Daemon, coordinator of water quality monitoring for the state’s environmental agency, said officials were strictly following Brazilian regulations on water quality, which are all based on bacteria levels, as are those of almost all nations.

“What would be the standard that should be followed for the quantity of virus? Because the presence or absence of virus in the water … needs to have a standard, a limit,” he said. “You don’t have a standard for the quantity of virus in relation to human health when it comes to contact with water.” Olympic hopefuls will be diving into Copacabana’s surf this Saturday during a triathlon Olympic qualifier event, while rowers take to the lake’s water beginning Wednesday for the 2016 World Rowing Junior Championships. Test events for sailing and marathon swimming take place later in August.

More than 10,000 athletes from 205 nations are expected to compete in the Olympics. Nearly 1,400 of them will be sailing in the waters near Marina da Gloria in Guanabara Bay, swimming off Copacabana beach, and canoeing and rowing on the brackish waters of the Rodrigo de Freitas Lake.

The AP commissioned four rounds of testing in each of those three Olympic water venues, and also in the surf off Ipanema Beach, which is popular with tourists but where no events will be held. Thirty-seven samples were checked for three types of human adenovirus, as well as rotavirus, enterovirus, and fecal coliforms.

The AP viral testing found not one water venue safe for swimming or boating, according to global water experts.

Instead, the test results found high counts of active and infectious human adenoviruses, which multiply in the intestinal and respiratory tracts of people. These are viruses that are known to cause respiratory and digestive illnesses, including explosive diarrhea and vomiting, but can also lead to more serious heart, brain, and other diseases.

Under a microscope

The AP commissioned Fernando Spilki, a virologist and coordinator of the environmental quality program at Feevale University in southern Brazil, to conduct the water tests.

Spilki’s testing looked for three different types of human adenovirus that are typical “markers” of human sewage in Brazil. In addition, he tested for enteroviruses, the most common cause of upper-respiratory-tract infections in the young. He also searched for signs of rotavirus, the main cause of gastroenteritis globally.

The tests so far show that Rio’s waters “are chronically contaminated,” he said. “The quantity of fecal matter entering the water bodies in Brazil is extremely high. Unfortunately, we have levels comparable to some African nations, to India.”

Griffith, the California expert, said the real concern wasn’t for what Spilki actually measured, noting that there was “very likely to be nastier bugs in there that weren’t searched for and that are out there lurking.” There is no lack of illness in Rio, but there is a severe shortage of health data related to dirty water, medical experts said.

‘A wasted opportunity’

In its Olympic bid, Rio officials vowed the games would “regenerate Rio’s magnificent waterways” through a $4 billion government expansion of basic sanitation infrastructure.

It was the latest in a long line of promises that have already cost Brazilian taxpayers more than $1 billion — with very little to show for it.

Rio’s historic sewage problem spiraled over the past decades as the population exploded, with many of the metropolitan area’s 12 million residents settling in the vast hillside slums that ring the bay.

Waste flows into more than 50 streams that empty into the once crystalline Guanabara Bay. An eye-watering stench emanates from much of the bay and its palm-lined beaches, which were popular swimming spots as late as the 1970s but are now perpetually off-limits for swimmers. Tons of household trash — margarine tubes, deflated soccer balls, waterlogged couches, and washing machines — line the shore and form islands of refuse.

Starting in 1993, Japan’s international cooperation agency poured hundreds of millions of dollars into a Guanabara cleanup project. The Inter-American Development Bank issued $452 million in loans for more works.

A culture of mismanagement stymied any progress. For years, none of four sewage-treatment plants built with the Japanese funds operated at full capacity. One of the plants in the gritty Duque de Caxias neighborhood didn’t treat a drop of waste from its construction in 2000 through its inauguration in 2014. For 14 years, it wasn’t connected to the sewage mains.

By then, the Japanese agency rated the project as “unsatisfactory,” with “no significant improvements in the water quality of the bay.”

As part of its Olympic project, Brazil promised to build eight treatment facilities to filter out much of the sewage and prevent tons of household trash from flowing into the Guanabara Bay. Only one has been built.

The fluorescent green lagoons that hug the Olympic Park and which the government’s own data shows are among the most polluted waters in Rio were to be dredged, but the project got hung up in bureaucratic hurdles and has yet to start. “Brazilian authorities promised the moon in order to win their Olympic bid, and as usual they’re not making good on those promises,” said Mario Moscatelli, a biologist who has spent 20 years lobbying for a cleanup of Rio’s waterways. “I’m sad but not surprised.”

As the clock ticks down, local officials have dialed back their promises. Gov.

Luiz Fernando Pezao of Rio has acknowledged “there’s not going to be time” to finish the cleanup of the bay ahead of the games.

Mayor Eduardo Paes of Rio has said it is a “shame” the Olympic promises won’t be met, adding the games are proving “a wasted opportunity” as far as the waterways are concerned.

But the Rio Olympic organizing committee’s website still says a key legacy of the games will be “the rehabilitation and protection of the area’s environment, particularly its bays and canals” in areas where water sports will take place.