But the fact that soccer officials even had to address the issue was a major embarrassment to Brazilian officials, who had fought so hard to land international events like the World Cup and the 2016 Olympic Games in order to showcase what a stable, democratic power their nation had become.

Now instead of being the culmination of Brazil’s rise, the events — and the enormous expense of hosting them — have become a rallying cry for the protesters to show how out of step their government’s priorities are with what the people want and need. While the government says it is spending more than $13 billion to prepare for the World Cup, including related construction projects, most of the stadiums are over budget, according to official findings.

“I love soccer,” said Arnaldo da Silva, 29, a supervisor at a telecommunications company supervisor, who celebrated back in 2007 when Brazil landed the World Cup but was also among the protesters in the streets this week, denouncing spending on stadiums when the infrastructure around those structures, like sidewalks, is crumbling. “It’s as if we’re divided between our heart and our head.”

As far back as the 1930s, fans here swelled with pride over the feats of players like Leônidas da Silva, a striker known as the Black Diamond who stunned European opponents with remarkably creative plays. Some Brazilian players like Sócrates, the hard-drinking doctor who was captain of Brazil’s 1982 World Cup team, transcended the sport by taking part in the pro-democracy movement against Brazil’s military dictatorship.

But while Pelé has been faulted publicly before for his stance on various issues and for his initial failure to acknowledge an out-of-wedlock daughter, the level of criticism against him and other soccer figures has changed. Now Brazil’s star players, even those speaking favorably of the current wave of protests, are suddenly finding themselves under scrutiny in new ways.