RIO DE JANEIRO — Sabotage by unhappy workers may have caused water and gas leaks, blocked toilets and electrical faults that slowed teams from moving into the athletes’ village, Rio Olympic organizers said Thursday.

“We are considering isolated cases, but we haven’t seen enough to say it was an organized sabotage thing,” Rio spokesman Mario Andrada said. He said the most likely cause was what he called “organizational problems.”

All 31 buildings at the massive compound for 18,000 athletes and staff were due to be ready at the end of Thursday, with the games opening in just over a week. Andrada said about 400 of the 3,600 rooms in the complex had defects.

South America’s first games have been plagued by problems, including the Zika virus, severe water pollution, security worries and slow ticket sales. But the slipshod construction is the first problem directly touching many teams and athletes.

Australia refused to check in at Sunday’s official opening, setting off public complaints by at least a dozen teams. Those complaints ranged from water dripping from ceilings and walls, the smell of gas, electrical shorts and stopped-up toilet bowls – or no toilet bowls at all.

Andrada described a “wild scramble” last weekend to find 650 plumbers and electricians.

“Imagine, this was on a weekend in Rio,” he said. “We called literally all the construction companies. We literally called every plumber in town.”

Rio is a relaxed beach town, where informal dress is normal and the work schedule is negotiable.

“One U.S. official told me the workers were unprepared, working with water on the floor, working with electricity and wearing no protection; wearing flip-flops,” Andrada said. “But that’s how we live here. Guys work with flip-flops. But the guys are technicians and know how to work.”

Protests have continued to roil the lead-up to the Olympics. On Wednesday night, government employees angry over delayed salary payments took to the streets in Angra dos Reis, near Rio de Janeiro, and confronted the procession carrying one of the Olympic torches.

Chaotic scenes caught on amateur video show a crowd of young people appearing to steal the torch from the procession and then extinguishing it. Local news reports said the Brazilian military eventually disbanded the protests, using tear gas and rubber bullets, and in return were showered with rocks and bricks by the crowd. One child was reportedly injured. The relay was temporarily halted.

Outpourings of anger have plagued Brazil of late, and that anger has taken the form of a series of attempts to steal or extinguish the Olympic torch, with fire extinguishers and buckets of water. Other times the torch bearers have simply foiled themselves by slipping or tripping.

Many in Brazil and around the world have raised questions about hosting expensive sports tournaments in countries with depressed economies and widespread poverty. Stadiums and accommodation for athletes and visitors are built at great cost, and often are left unused after the Games. Proponents argue that the influx of money for the Games spurs the development of public infrastructure, and hosting the Games should be a matter of pride.

BRAZILIAN FEDERAL police said they arrested a 28-year-old Brazilian-Lebanese man suspected of ties to terrorism.

The lawyer for Chaer Kalaun said his client only posted messages on social media and never intended to attack the Olympics. Police didn’t describe possible charges.