Thousands of anti-government demonstrators took to the streets of Rio before Sunday afternoon’s Confederation Cup final between Brazil and Spain, marching on Maracana Stadium to protest what they deemed to be irresponsible government spending.

Shortly before the Brazil vs. Spain match got underway, protesters and police clashed just yards from the entrance to Maracana Stadium, the Associated Press reports. The protesters were reportedly angry that the Brazilian government was spending money on sporting events such as the Confederation Cup rather than the nation’s public infrastructure.

Brazilian police officers used tear gas and stun grenades to subdue the increasingly volatile crowd, prompting protesters to respond with Molotov cocktails and fireworks, AP reports. Some crowd members attempted to fight through security and enter Maracana Stadium before the match, but were restrained by police.

Sunday’s protest was just the latest in a series of anti-government demonstrations, with one recent march drawing a crowd of over 1 million people, AP reports. The marches began in June over a 10 cent increase in public transportation fares, but have transformed into a nationwide condemnation of perceived government corruption, as well as educational and health care problems.

''Here in Brazil we took too long to wake up to discover they spent billions on stadiums, but they say there's no money for hospitals, no supplies for doctors,'' protester Mariela Simao told AP. ''They tried to take action to show the population they are doing something, but they could do more.''

Despite Sunday’s protests, soccer fans were treated to a riveting Confederation Cup final. In the match, Brazil managed to defeat reigning World Cup champion Spain, despite the fact that the latter had not allowed a goal in its last 811 minutes of elimination-game play.

Brazil’s forward Fred scored a pair of goals, and 21-year-old phenom Neymar added a goal of his own en route to a 3-0 victory. Fred managed to match Spain’s Fernando Torres for a tournament-leading five goals, while Neymar was named the tournament’s best player, Pro Soccer Talk reports. Brazil has now won the Confederation Cup four times.