It was hard to say which was more beautiful, the peak-to-sea silhouettes of the imperial old city or the athletes in sweet motion. They were the wallpaper for everything, and without them you would be left with the debts and the floating garbage and the flying rocks, and you would have to ask whether the Olympics were really worth it anymore. So it’s a good thing the Redeemer and Neymar were there.

They covered up the ragged edges and the back-bowed weariness of the town. They were the curtains that hid the nakedness of International Olympic Committee member Patrick Hickey of Ireland, arrested in his hotel and charged with ticket scalping. They hid the half-empty stadiums and the state’s $6 billion deficit and the Olympian cost overruns, with a budget shortfall so steep there was a question of whether the Paralympics could be staged at all. On Sunday morning, some venues and their unsteady pipe-and-board pedestrian ramps already had been dismantled to save money. It was more than a little hard to swallow IOC President Thomas Bach’s contention that these were “the people’s Games,” “most happy Games ever,” “the beautiful Games,” “passion Games.”

[This federally created body is unwilling to help U.S. athletes make ends meet.]

The Rio Games did do some visibly good things for this breezy-warm, surf-washed city “of a thousand graces,” with its hidden hillside villas and dusty, palm-studded squares. There is a glorious new port and white-winged museum to welcome tourists, replacing rank old piers, and a new highway to the wealthy suburbs. Bach tried to claim a piece of credit for those, saying, “For decades there was no real investment in this city. . . . Imagine where Rio would be today if this situation had continued.” But the question that will require months if not years to answer is whether the “Olympic movement” took more from this recession-wracked city than it ultimately gave, in demands, rake-offs and burdens.

There were visible signs of Rio’s cash-strapped struggle to throw the Games. An open sewer just outside the Olympic Park reeked, and each morning helicopters hovered over polluted Guanabara Bay, checking it so that large debris and waste wouldn’t float into the venues. Inexperience caused the diving venue’s pools to turn so green you couldn’t see the bottom. A cable snapped and sent a giant camera crashing down on spectators in the Olympic Park. A boat ramp collapsed; a brush fire broke out. Still, Rio’s citizens and volunteers somehow brought off this massive undertaking, caring for and feeding 11,000 athletes and their entourages.

The exalting performances of those athletes against the backdrop of green mountains plunging into bays made the breakdowns seem like glitches. It was arguably the most remarkable collection of champions ever collected in one place. “There you go; I am the greatest,” Usain Bolt crowed after winning his ninth gold in the 4x100-meter relay, but he had to share the claim with the dolphin-backed Michael Phelps, the epic sojourner Katie Ledecky, the human pinwheel Simone Biles and a titanic U.S. women’s basketball team that won its sixth straight gold medal.

It’s not just great ones we will remember, either. Some will linger in the mind as much for what they did as what they said, for their eloquence. “Every time you beat someone, you’re crushing their dreams, so it’s a tough old process,” British boxing gold medalist Nicola Adams said. Wrestler Helen Maroulis said she “just didn’t want to look at Goliath and get scared” and produced one of the great gold medal upsets of the Games over three-time champ Saori Yoshida. Shakur Stevenson and wrestler Jordan Burroughs made defeat sound like soul-singing, to drown out the lame-drunk Ryan Lochte. But maybe no words were as affecting as those of Abbey D’Agostino to Nikki Hamblin of New Zealand after they stumbled in a 5,000-meter heat:

“Get up, get up. We have to finish this.”

It could have been the motto for the entire put-upon city, trying to throw a world-class event while burdened to the breaking point. Unemployment is at 11 percent and rising, corruption scandals dot the political landscape, civil servants are owed back pay, and rampant street crime is a plague amid a murderous war between military police and gangs. Though there were robberies and a stray bullet, the Olympic guests were relatively untouched by all this, compared with the everyday Brazilian. That itself was a victory. As Rio 2016’s amiable spokesman Mario Andrada said, “Sometimes a bronze looks like a gold, and you celebrate the achievements of a nation.”

[Rio deserves better than what it’s gotten from the Olympics]

Bach, the head of the portentous IOC executive cadre that collects $900-a-day per diems, could not entirely gloss over the state of affairs in Rio or the gulf between the haves and have-nots. On Saturday he had the nerve to call this “an iconic Games, but it is also a Games in the middle of reality. It has not been organized in a bubble but in a city where there are social problems and social divides, where real life continued. This was very good for everybody — to be close to reality and not in a bubble for 16 days and isolated from society.”

The reason-for-being of the Olympics in its current costly form grows sketchier with every albatross that drains a city. A tarnished Victorian relic, the child of Baron de Coubertin, is being used as cover for plunder. Is it really wise to stage them when they create suspiciously large deficits, not to mention huge security issues and traffic jams? It’s expensive enough just to pay for the public safety. Fewer and fewer host cities are willing to take on the debt caused by the IOC’s model and its five-star demands. They are not a necessity, in an age with live-stream access to every sport imaginable. They are, in fact, potentially unsustainable.

Fans from around the world gathered in Maracana stadium to celebrate the end of the tumultuous 2016 Rio Olympic Games on Aug. 21. (Reuters)

The 11,000 athletes and the local citizenry are the redeemers of the Games. Yet they are the most burdened and the least rewarded for their efforts, while the IOC picks at buffet lunches and pockets massive streams of revenue. The IOC needs a new model, one that rotates the Games among cities with existing sites. It’s time to end these massive cost overruns. If the IOC really wants to show the world that its “movement” has values other than price-gouging and ticket-scalping, it can start by dipping into its swelling bank account and offering Rio support for the Paralympics. It’s time for the IOC to become more of a giver than a taker.

For more by Sally Jenkins, visit washingtonpost.com/jenkins.