Eduardo Paes had a dream: to stage a smoothly run Olympic Games in a beautiful city and create an experience so wondrous that it would draw millions of tourists to Rio de Janeiro in the years that followed.
Rio's mayor had Barcelona in mind: hosting the 1992 Olympics marked a turning point for the Catalan city, which saw its international reputation transformed thanks to a good-natured, spectacularly staged Games.
But the well-documented problems that dogged Brazil before the Games - economic and political crises among them - had even Paes questioning whether this was the right time for the eyes of the world to fall upon Rio.
The first week of the Rio Olympics seems to have proved him right. Complaints, security problems, poorly constructed buildings: Rio's not quite managed to come cleanly out of the blocks. At the moment, it doesn't look like history will judge these Games kindly.
There have been positive stories: the improved water quality in the Olympic sailing area at Guanabara Bay, judo gold for former favela child Rafaela Silva, the party-loving fans.
However, these stories have played second fiddle behind the many tales of things gone awry. An overview.
STRAY BULLETS: There was consternation as a stray bullet ripped through the media room at the equestrian centre in Deodoro. Another bullet was later found in the stables area.
The venue is situated next to a military complex, but officials say the bullets came from a nearby favela and had not originally been aimed at the equestrian venue - but rather at a police blimp and at officers who carried out an ensuing operation in the favela.
LACK OF SECURITY: A bus full of journalists covering the Games was attacked on a motorway between Olympic venues. Its windows were shattered - the police say by stones, though some of the journalists on board were adamant that they heard gunfire.
HELPLESS HOSTS: The spokesperson for the Rio organising committee, Mario Andrada, has done his best to be honest, but he has spent most of his time commenting on bad news, apologising and promising rapid improvements.
Before the Olympics, he had given assurances that Rio would be the safest city in the world. Reports of theft within the Olympic village itself have made a mockery of that claim.
EMPTY STADIUMS: Full houses have seldom been seen in Rio. Even beach volleyball, a sport beloved in Brazil, has failed to draw capacity crowds. Officially, more than 80 per cent of tickets have been sold, but organisational problems - along with sponsors' tickets going unused - have caused the surfeit of empty seats.
The first day of the competition saw as many as 40,000 seats go empty as huge queues stopped people from reaching the stadiums in time. A combination of strict security measures and insufficient personnel was another contributing factor in fans' entry being delayed.
Local schoolchildren are now being given tickets for free to make sure seats are filled.
LACK OF AMENITIES: Visitors to Barra Olympic Park and Deodoro Sports Complex have been unable to get access to water and food; indeed, they were allowed to leave the sites in order to find provisions elsewhere.
Water is now being given out free in some official Olympic areas, but the problem has not yet been brought completely under control.
CRITICISM OF FACILITIES: The German Olympic tennis coach Barbara Rittner said: "What I personally find difficult is that things are pretty dirty everywhere, whether in the changing rooms or in the [Olympic] village."
There are a lot of makeshift buildings and lots of things breaking. Rittner's compatriot, rifle shooter Barbara Engleder, is similarly unimpressed by conditions in the village.
"The rain's coming in through the ceiling. There's been a huge hole in the lobby for days," she said. "There'll probably be mould by the time the people who arrive after us get here."
There's still time for the Games to get back on track, but perhaps Paes's Barcelona dream has already disappeared over Rio's beautiful horizon.
Rio Games organizers are considering giving schoolchildren tickets for Olympic events to fill tens of thousands of empty seats.
Security is a top priority at the Rio Olympics, its organizers said Thursday, as incidents continued to be reported on the sidelines of the Games.
Olympic organizers said Wednesday they remain determined to make Rio de Janeiro a safe place despite various incidents including an attack on an official media bus the previous day.
A Brazil police bomb squad conducted a controlled explosion of an unattended backback near the course of the Olympic cycling road race on Saturday.
The Belgian royal couple has been prevented by Brazilian authorities from visiting a charity project in one of Rio de Janeiro's favelas, a Brazilian report said.
The crucial metro link to the Olympic Park in Rio de Janeiro was inaugurated Saturday in the presence of Brazil's acting President Michel Temer.
A Brazilian reporter entered the athletics stadium for the Rio Olympics without any accreditation and spent two hours there before being noticed by security, he said on Friday.
Germany's slalom canoeist Sideris Tasiadis has praised the athletes' village at the upcoming Rio de Janeiro Olympic Games amid concerns voiced by Swedes and Belarussians that it was not fit for purpose.
Australian Olympic officials have condemned the Rio athletes' village as uninhabitable due to plumbing and electrical problems, it was reported Monday.