RIO DE JANEIRO -- After 1,192 days, Brazil's run of hosting mega-sports events came to an end Sunday at the Paralympic Games.
It began with soccer's Confederations Cup in 2013, extended to the 2014 World Cup, ran through IOC President Thomas Bach's goodbye speech last month at the Rio de Janeiro Olympics, and finished with the closing ceremony of the Paralympics before 45,000 spectators at Rio's Maracana stadium.
Awarded when Brazil was a rising economic power, the sports pageants focused unprecedented attention on the country -- much of it unwanted.
As the shows went on, Brazil plunged into a deep recession. A billion-dollar corruption scandal buffeted state-run oil company Petrobras, and President Dilma Rousseff was removed from office in an impeachment trial just days after the Olympics closed.
"This all left a very mixed legacy," Mauricio Santoro, an international relations expert at the State University of Rio de Janeiro, told The Associated Press. "We are going to need some years to evaluate what was the impact, the worth of these events for Brazil."
By a conservative estimate, Brazil spent about $30 billion organizing the events with a mix of public and private money that included the construction of four white-elephant soccer stadiums for the World Cup. All four are in cities without major teams.
Rio fared better with the Olympics, getting a metro line extension, bus lines, and light-rail. But much of the investment was aimed at Rio's upscale suburb of Barra da Tijuca -- not at the city's sprawling favelas, or slums. The Olympic Park and Athletes Village there will be moulded into high-priced commercial and residential properties now that the games are done.
"I think the Olympics and Paralympics were a boost to the self-esteem of Brazil," Santoro said. "They happened when everything was going so bad in Brazil. The mere fact they happened without serious problems, without an infrastructure disaster, without a terrorist attack, made Brazil feel better about itself."
Brazil's reputation away from home is another matter. Only a handful of foreign leaders attended the Olympics -- compared to about 100 four years ago in London.
The state of Rio de Janeiro is broke and defaulting on bond payments. Some schools have suspended classes, and hospitals are understaffed. Only a last-minute bailout of about 250 million reals ($76.5 million) from the federal and local governments saved the Paralympics from a shortfall in the organizing committee's privately funded operating budget.
"There was a feeling that Brazil is such a big mess," Santoro said. "How could you have a good opinion of this country?"
Organizers bragged about legacy, but failed to deliver on a big promise made to secure the bid: the clean-up of Guanabara Bay, an open sewer that receives much of the city's untreated raw waste.
Rio Mayor Eduardo Paes acknowledged the clean-up was a "missed opportunity," one the International Olympic Committee overlooked and often defended.
The Olympics endured some rough going, plagued by empty seats, organizational glitches and scandals -- one involving American swimmer Ryan Lochte and another in which high-ranking IOC member Patrick Hickey was arrested for scalping tickets. Hickey is still in Brazil awaiting trial and denies any wrongdoing.
Bach also skipped the opening of the Paralympics to attend a mourning ceremony for former West Germany president and foreign minister Walter Scheel. His office said he missed Sunday's closing ceremony to be in New York to take part in the United Nations Refugee Summit.
Police investigators in Brazil want to question Bach about email exchanges he had with Hickey related to Ireland's ticket allocation. He's not accused of wrongdoing, but he could be held if he arrives in Brazil.
Against most predictions, the Paralympics were a smoother ride with grassroots support. Arenas were packed with many tickets selling at just $3 apiece, in contrast to the Olympics, where many tickets were sold as part of high-end hospitality packages and often went unused.
The Paralympics also topped the Olympics in compelling stories, and in some performances.
No story was more moving than that of 37-year-old Belgian Marieke Vervoort, who won a silver medal in wheelchair racing. She has a degenerative spine disease and talked of plans to end her life by euthanasia when she can no longer endure the pain.
"For me, I think death is something like they operate on you, you go to sleep and you never wake up," Vervoort said. "For me, it's something peaceful."
The top four finishers in the men's 1,500 -- in the T13 class for visually impaired runners -- all had better times than the Olympic champion in Rio, American Matthew Centrowitz. Abdellatif Baka of Algeria won in 3 minutes, 48.29 seconds. Centrowitz ran 3:50.00 in an admittedly slow, tactical race.
German amputee long-jumper Marcus Rehm, who jumps with a carbon fiber blade and won gold in Rio, also holds the long jump world record of 8.40 metres. This is better than the winning jump in the Rio Olympics at 8.38 metres.
There was tragedy, too, when Iranian Bahman Golbarnezhad, 48, died Saturday after crashing in a road-cycling race.
China topped the medal table at the Paralympics, which is increasingly driven by nationalism -- much like the Olympics. Britain, Ukraine and the United States were next on the table.
"The Paralympics are a high-performance sporting event between countries," IPC spokesman Craig Spence said. "The goal is to win the most gold medals here. That's what every sport is about. It's about winning."