Brazil and superstar Neymar were the first to qualify for next year’s World Cup, save for Russia which gets an automatic berth as the host.

Winning a record sixth World Cup might help some forget the humiliating 7-1 loss to Germany three years ago in the World Cup semifinals.

But as the soccer team soars, more details are emerging in Supreme Court documents describing a corrupt infrastructure in Brazilian sports and its governing bodies.

Plea-bargain testimony shows staggering kickbacks tied to the World Cup and the last year’s Rio de Janeiro Olympics, detailed in testimony by executives and former executives of Odebrecht, the Brazilian construction company at the center of a billion-dollar graft scandal.

“People can stand so much, and obviously the hardcore fans continue unbothered,” soccer historian David Goldblatt told The Associated Press. “I think now there are many Brazilians who feel less affectionate toward the game. They know that rather than showing off the best of Brazil, often it’s showing off the worst.”

Testimony shows that at least six of Brazil’s 12 World Cup stadiums were built or financed through graft. Former Odebrecht vice president Benedicto Barbosa da Silva testified that the company didn’t want to be involved with World Cup stadiums because there were sure they would become “white elephants.”

Many did, including stadiums in Brasilia, Manaus, Cuiaba, Natal, and Recife. Brasilia’s has been used as a bus terminal.

FIFA required only eight stadiums, but politicians, construction companies, and sports officials pushed for more.

FIFA and the International Olympic Committee say construction projects are left to local organizers, though sports venues must meet stringent Olympic or World Cup specifications.

“There is an increasing number of literate, computer-savvy, media-connected young Brazilians who are struggling away and don’t buy the football, the sports myth any longer,” added Goldblatt, the author of “The Ball is Round: A Global History of Football,” and “Futebol Nation.”

In Rio de Janeiro, former mayor Eduardo Paes was the moving force behind last year’s Olympics. Now he’s being investigated for taking at least 15 million reals ($5 million) in payments to push construction projects linked to the games.

In December, Paes unexpectedly called off plans to teach in New York at Columbia University after a court froze his assets as a prosecutor investigated if he waived environmental rules for the billionaire developer of Rio’s Olympic golf course.

He has denied all charges.

Sergio Cabral, a former governor of the state of Rio de Janeiro and an early Olympic booster, has been jailed on corruption charges and awaits trial.

“Brazil’s double-whammy has given us a shove toward a place where people still want to watch sports mega-events like the Olympics and World Cup, but no one wants to actually host them,” Jules Boykoff, who teaches sports politics at Pacific University, told The Associated Press.

The IOC has two remaining bidders for the 2024 Olympics — Paris and Los Angeles. The vision of rising costs is prompting fewer to bid, and some that do are not the high-profile cities the IOC would prefer.

Boykoff, a former professional soccer player, said the Olympics and World Cup remain riveting because of the “inspiring athletes.” But even some of those are being stained by doping and financial shenanigans.

Neymar is to stand trial in Spain on corruption charges related to his transfer to Barcelona four years ago. He could face a two-year prison sentence, but would likely serve a suspended sentence and a fine of about $10 million.

Much of the focus in sports corruption in Brazil has been on its powerful federations that govern popular sports like soccer, swimming and volleyball.

Brazil’s entire Olympic team underperformed, winning fewer medals than predicted despite getting a funding boost as the host country.

Earlier this month, the former head of the Brazilian Aquatics Confederation, Coaracy Nunes, was arrested on suspicion of embezzling public funds. Brazil failed to win a single medal in the pool in the Rio Olympics. Police allege $15 million for athlete development went instead to Nunes and other officials.

Brazil’s volleyball confederation has been investigated by government auditors for the way it awarded millions in contracts. — The former head of the Brazilian Football Confederation Jose Maria Marin is being held in the United States awaiting trial on charges connected with the FIFA corruption case. Current CBF president Marco Polo Del Nero, and another former president Ricardo Teixeira, are wanted on many of the same charges and do not travel out of Brazil for fear of arrest.

“If Brazil wins the World Cup, no fan is going to say it’s a shame we have a corrupt governing body,” Nigel Currie, a London-based sports sponsorship consultant, said. “Most fans don’t care.”

___

Stephen Wade on Twitter: http://twitter.com/StephenWadeAP .His work can be found at http://bigstory.ap.org/content/stephen-wade