The water of the diving pool appears a murky green in the Maria Lenk Aquatic Centre at the Rio Games. (Matt Dunham/AP)

Before the bus windows got blasted out and the water in the aquatics center turned emerald, before the Australian coaches got robbed at knifepoint and the Belgian sailor fell sick after tumbling into the sewage-strewn bay, before gang members in a favela killed a Brazilian police officer and a stray bullet landed in the media tent, one could make the case that Rio’s Olympics were going well.

But the scares, mishaps and inconveniences have started to pile up. Olympic organizers have been bombarded by questions about the safety and efficiency of arenas and transportation routes, about the spotty attendance and officials’ tough response to political protests, and about the level of contamination in swimming pools, which turned an algal green this week, forcing organizers to cancel a diving practice session Friday morning.

As a developing country, Brazil was inevitably going to have problems that would be rare in a wealthier country, and those were compounded by a severe recession and a political crisis in which the president is awaiting an impeachment trial. And, to be sure, there has been no major tragedy so far, such as the bombing at the Atlanta Games in 1996 or the massacre of athletes in Munich in 1972. Many fans insist the criticism is overblown and say they are enjoying thrilling athletic events.

Still, many Olympic veterans, athletes and fans say that Rio’s parade of problems has set the Games off to an unusually poor start, even as Cariocas — as Rio’s residents are called — have begun to warm to them.

Since Brazil won the Olympic bid in 2009, its financial fortunes have collapsed. Budgets for the Opening Ceremonies and other aspects of the Games got slashed, and the run-up to the Olympics was marked by protests over a massive corruption scandal that has roiled the government. President Dilma Rousseff is awaiting trial for impeachment on charges of breaking budget laws, which she denies. She has not participated in the Olympic festivities.

Mark Adams, a spokesman for the International Olympic Committee, told the BBC program “Today” that this has been “the most difficult Games we have ever encountered” in terms of the political and economic context. “Seven years ago, when they were selected, they were on the verge of being a top five GDP nation in the world.” Now unemployment is at 11 percent, and the economy has been steadily shrinking.

With more than 85,000 soldiers and police providing security for the Games, Rio de Janeiro — and particularly areas around the Olympic arenas — has the feel of a military garrison. Before the Games, Rio Mayor Eduardo Paes predicted that Rio was “going to be the safest place in the world” in August. That has not been the case.

Last Saturday, a stray bullet pierced the roof of the media tent at the equestrian venue. Three days later, two windows on an Olympics bus were struck by projectiles. Organizers claimed they were rocks; passengers suspected gunfire. The next day, a pickup carrying police officers working security for the Olympics took a wrong turn into a favela and was met by a hail of bullets. One officer has since died.

Throughout the Games, Olympics fans and participants have been mugged, sometimes in harrowing circumstances. Two Australian rowing coaches­ were robbed at knifepoint near Ipanema Beach, and Portugal’s education minister was assaulted near a downtown lagoon. Felipe Seixas, the Brazilian government’s chief of security for large events, himself was targeted by a gang of thieves outside of Maracanã Stadium.

Lee Michaelson, a retired Air Force captain who is a correspondent for the women’s basketball news site Hoopfeed, was one of the journalists on the bus that was attacked. She expressed frustration to Olympic organizers that the bus did not have a first-aid kit easily accessible and that the driver lingered in the zone of attack with the bus lights on instead of clearing the area immediately. But she said that after her complaints, Rio committee organizers met with her and increased security along the bus routes.

“I think they’re trying to make progress in a very difficult situation,” she said. “Unless we want to live in a virtual prison, there’s no way to prevent every possible bad thing that might happen.”

When problems have arisen, Olympic organizers have searched for solutions, almost too frantically. On the first day of competition, security screenings created massive lines for fans at the main Olympic Park, so many of the people departed, leaving swaths of empty seats. Security officials began checking bags manually instead of putting them through X-ray machines, a move that prompted criticism that security protocols were being disregarded.

The murky green pool water has been a recurring problem. When the water at the Maria Lenk Aquatics Center suddenly changed from blue to a murky jade, Olympic staffers tossed in more chlorine, enough to sting the eyes of the water polo players.

“What’s ridiculous is not the green water. I’ve played in plenty of pools with green water. The problem is they put way too much chlorine in,” Tony Azevedo, the captain of the U.S. water polo team, told reporters after a game this week. “I could barely open my eyes for the final quarter.”

When the problem still wasn’t fixed, Olympics officials canceled a diving practice session Friday morning so the pool could be “still” enough for the chlorine to work.

Athletes and coaches, most of them staying in a cluster of high-rise apartment towers in western Rio, have complained about a smell of sewage, sporadic hot water, lackluster cafeteria food and spartan bedrooms.

“A lot of people said it is not [as] good as London, as Beijing,” said Jozef Repcik, 30, an 800-meter runner from Slovakia who competed in the Beijing Olympics in 2008.

Argentine handball player Matias Schulz said members of his team had suffered two or three petty thefts from their rooms in the Olympic Village, which is in a desolate area about an hour from Rio’s main attractions. The training facilities available to the Argentine team lack showers, he said. And the food in the athletes’ cafeteria paled in comparison with that from the facilities at the 2012 Games in London, where he also competed, he said.

“It’s okay for three or four days, but not for 20,” Schulz said.

Not everyone is unhappy about their Olympic experience. Athletes and visitors have praised the warmth of Brazilians and the exuberance of the fans.

“Before you came, you heard many stories, which is unfortunate, because the Brazilians have put on a good show,” said Ikechukwu Diogu, 32, a Nigerian basketball player. And he singled out Brazilian spectators for praise. “It’s been unbelievable, especially for us, the Nigerians. They’ve been supporting us. The Brazilians have been our sixth man on the court.”

Perhaps the most talked-about threat before the Olympics, the Zika virus, has almost disappeared as a concern. Some of the world’s top athletes, including several golfers, skipped the Games, citing worries about Brazil’s Zika epidemic. But during the sometimes-chilly Rio winter, the mosquitoes that transmit the virus have been scarce.

The rooms in the Olympic Village came with wall plug-in repellent dispensers, and athletes have anti-insect sprays and creams. But some have dropped more extreme precautionary measures. When the U.S. women’s rugby team came to Brazil in February for a competition, they wore full-body “compression gear,” a type of thick tights that mosquitoes couldn’t penetrate. The uniforms proved so suffocatingly hot that the players scrapped them.

Now, team members said, Zika has rarely been on their minds.

“I don’t worry about it,” said Lauren Doyle, 25, a rugby player from Boody, Ill. “I just put bug spray on before practice.”

Some people have found it difficult to travel between venues, because of the lengthy bus or metro rides and confusing signage.

Duleep Deosthale, a 55-year-old former professor who is attending his 10th Olympic Games, calls himself the “quintessential spectator.” He said he found the athletic competition in these Olympics “wonderful as always.” Empty seats, he said, are common for all Olympics. Long lines and bad food are not exactly breaking news for the Games. But he did find it confusing to get around and encountered volunteer staff members who were poorly informed, although eager to lend a hand, he said.

“Luckily the people are so warm and wonderful and willing to help that you can’t really fault them,” he said. “That’s the saving grace.”

Adam Kilgore and Sally Jenkins contributed to this report.