You can see what a triumph the Rio Olympics might be as you laze beneath a Jucara palm and stare sleepified across the city’s opal-tinted beaches or traverse the ruined old streets that still show the faint facades of empire. There is a great world capital and host city lurking here under the tired brown fronds, if Brazil only could dig out of this economy and survive this albatross. The Olympics should build Rio up, not drive it down.

The Games have stressed a city already under stress; you can see that in the stoic faces waiting for the groaning city buses that aren’t permitted in the dedicated lanes and the angry protests that followed the torch. But by the eve of the Opening Ceremonies, it also was plain what a grand if teetering metropolis this is, with its eras stacked one top of another: imperial, colonial, belle epoque and modern. The possibility that Rio de Janeiro bought into nine years ago is epitomized by the new shimmering winged Museu do Amanha, the “Museum of Tomorrow” at Porto Maravilha, where an old vice-ridden dock has become a splendid signature waterfront akin to Sydney or San Francisco and where boys jump into murky Guanabara Bay heedless of the viral count. The potential cost is in those wedged favelas, the corrugated tin and brick walls stained with the flared colors of graffiti, and the shouts of people wondering why $12 billion has been spent on white winged extensions into the future and stadiums an hour outside of town instead of jobs, sewers and water.

The International Olympic Committee has a responsibility to Rio de Janeiro now. Brazilians have invested heavily in these Games despite the fact that Rio has a $6 billion deficit and even toilet paper is hard to come by. Under the best circumstances, the Olympics are a risky megaproject of questionable value to the locals. They demand massive infrastructure, and perpetual cost overruns have left a string of ghost stadiums and economic casualties from Athens to Beijing to Sochi to Rio. The right thing is for the IOC to come back to these cities some day and give them a chance to use these stadiums again and pay it down.

Bringing the Olympics here was not a mistake despite the unfinished buildings and exposed pipes and sewer water. There have been reports that the IOC is unhappy, and tension is palpable between Rio Mayor Eduardo Paes and IOC President Thomas Bach. The other day Paes commented, “Brazil cannot pay caviar bills for others.” It was obviously directed at the IOC’s affinity for five-star luxury. When asked about the remark at a news conference, Bach dropped his usual bureaucratic drone and snapped, “I know the mayor from time to time likes the kind of remarks that he considers to be a joke. . . . This is ridiculous.”

Explore the neighborhoods and meet the people of a city transformed to host its first Olympics.

But the truly ridiculous remark came from Bach. Questioned as to whether IOC’s financial model is too unwieldy and unsustainable, his reply set a new standard for arrogance. “You can say clearly that the financial model of the Olympic Games has really stood a stress test, that we hope not to stand again in the future,” he said.

Look here: The IOC has not been stressed. The people of Rio de Janeiro, amid the worst economy since the 1930s, have broken their spines and devoted every available resource to meeting Olympian demands and somehow raised up stadiums despite the lack of basic necessities in their own homes and workplaces.

This fact gives the Rio Games an atmosphere unlike any before: There is a mixed undercurrent here, a skeptical pride, a political roil and above all a juxtaposition of gorgeousness and want, existing side by side. These are an especially striated, bifurcated Olympics. At Copacabana and Ipanema beaches, the Olympic tourists stroll past luxury towers washed in sea foam colors while shirtless, mahogany-chested panhandlers peddle whistles and rope bracelets or charge a few coins in a bucket for a picture of elaborate sandcastles. A man sells bikinis draped from an umbrella and throws sand at pigeons to keep them from his sandwich. At tiny bar kiosks, bartenders lounge with heads bowed in the attitude of those weary palms, lifting as if on a breeze when a customer strolls in.

In Centro, the real heart of old Rio de Janeiro, concrete duels with green mangrove trees, and you can see the excavated slave market, close by the streets of Saude and Little Africa, where the freed Bahians played the first notes of samba. The belle epoque buildings are all but ruined, ornate but chipped facades in fading colors with rusting wrought iron. The churches and statues of hooded stone monks are gypsum-crusted.

What you discover is that there are many Rios. It’s a serpentine city wending around coves and beaches and climbing hillsides in an infinite variety of neighborhoods. The Olympic Park in Barra da Tijuca is hardly part of it. It’s a man-made suburb built by Olympic real estate speculators, alternately razed bare and studded with Texas-sized malls — an estimated 60,000 people lost their homes to Rio Games projects. It’s so far from central Rio de Janeiro that the joke among locals is that “you need a passport to get there.”

The IOC must stop draining local populaces that host the Games. The Games have become too large and costly. Predatory contractors use Olympic deadlines to gouge, hike and rake off on building projects that become useless shells. There is no reason the Olympics should not go back to the cities that have taken on these massive obligations. Create a regular rotation so that structures can be reused and the local merchants and residents have a chance to see some profit from them.

Visualizing the Rio Olympics in charts, graphics and maps

Bach clearly hinted that coming here was a mistake. But that was not the mistake. Rio’s economy was fragile and developing, with little capacity to absorb escalating costs.

Now that Rio has bought and paid for these Olympics, the IOC can help pay down the debt. It should award Rio de Janeiro another Games in the near future, when its economy is better. The only mistake would be to leave here having done nothing but take — without ever giving back.