When the Fifa president Sepp Blatter announced in 2007 that next year’s World Cup would be staged in Brazil, he predicted it would have “a big social and cultural impact”. It has, but not in the way he expected. Instead of uniting Brazil in celebration, football’s biggest prize, which is returning after 54 years to the country that has won it more times than any other, is proving a catalyst for massive demonstrations. Hundreds of thousands of Brazilians have taken to the streets to express their anger at the cost of staging the tournament, along with high taxes and prices, poor public services, corruption and police brutality.

The protests – the largest in a generation – flared in more than two dozen cities on Monday evening and came after police had previously repelled smaller-scale demonstrations with violence. The fifth day of marches, mostly organised on social networks, came as the country hosted the opening games of the Confederations Cup, a warm up to the World Cup.

“Sorry to disturb you, our country is under construction,” one banner read, expressing the widely held frustration at the billions spent on the tournaments while investment is desperately lacking elsewhere.

Download the new Independent Premium app Sharing the full story, not just the headlines

In Brasilia protesters danced on the roof of the country’s National Congress while shock troops inside the building braced themselves for an invasion of the parliament’s chamber. In Rio where 100,000 marchers clogged the streets, a few lit bonfires, threw rocks and Molotov cocktails and tried to storm the state’s Legislative Assembly, cornering 70 officers in the process. In return police fired tear gas and rubber bullets.

Despite injuries to 30 officers and protesters the event was largely peaceful, with mainly young, educated crowds marching down Rio’s central Avenida Rio Branco with national flags, flowers and banners, chanting “The people have awakened” and “Pardon the inconvenience, Brazil is changing”. Another 65,000 marched in Sao Paulo.

“This is a communal cry saying: ‘We’re not satisfied’,” Maria Claudia Cardoso, protester, said. “We’re massacred by taxes – yet when we leave home in the morning to go to work, we don’t know if we’ll make it home alive because of the violence. We don’t have good schools for our kids. Our hospitals are in awful shape. Corruption is rife. These protests will make history and wake our politicians up to the fact that we’re not taking it any more.”

“For many years the government has been feeding corruption,” Graciela Caçador, added. “They spent billions of dollars building stadiums and nothing on education and health.”

The protests are among the largest since the nation’s military dictatorship ended in 1985 and came as a shock to the authorities, which are unused to widespread popular dissent. As well as the Confederations Cup, the protests come just one month before a visit from Pope Francis. The World Cup kicks off in Sao Paulo on 12 June next year, and two years after that the Olympics will open in Rio de Janeiro.

Brazilians have long suffered from an inefficient state, with £30bn of public money reportedly lost to tax evasion and corruption every year. But in the last decade about 40 million Brazilians have moved into the middle class and have begun to demand more of their politicians.

On 6 June a few hundred protesters of the student-dominated Movimento Passe Livre – the Movement for Free Travel, gathered in Sao Paulo. That week Brazil’s largest city had raised bus fares from R$3 (89p) to R$3.20 – a move followed in other cities across the country, with some citing the need to upgrade infrastructure in preparation for next year. The increase – which meant fares had risen sixfold since 1994 – was punishing for poor families, many of whom face long commutes and survive on the minimum wage of R$156 a week in a country with some of the most expensive cities in the world.

Daily coronavirus briefing No hype, just the advice and analysis you need Enter your email address Continue Continue Please enter an email address Email address is invalid Fill out this field Email address is invalid Email already exists. Log in to update your newsletter preferences Register with your social account or click here to log in I would like to receive morning headlines Monday - Friday plus breaking news alerts by email Update newsletter preferences

Police dispersed the protesters with tear gas but another demonstration in Rio de Janeiro last Monday turned ugly, with police using pepper spray and stun grenades on the 300 marchers, and videos of police brutality on social media swelling the crowds. The biggest crackdown came on Thursday in Sao Paulo, where police fired rubber bullets and tear gas, injuring more than 100 people. Among them were 15 journalists, some of whom said they were deliberately targeted. Demonstrations then flared outside the Confederations Cup as it began on Saturday, before Monday’s demonstrations heralded a nationwide explosion.

What began as the Passe Livre movement is now also referred to as the “vinegar revolution” after at least one person was allegedly arrested at a protest for carrying vinegar to alleviate the symptoms of tear gas.

The President, Dilma Rousseff, a former leftist insurgent who was tortured by Brazil’s military dictatorship and who has introduced moderate social-democratic reforms to a country that has long been one of the most unequal in the world, is treading carefully. In a statement, Ms Rousseff, who faces re-election next year, said: “Brazil today woke stronger. The greatness of the demonstrations proved the power of our democracy, the strength of the voice of the streets.

“It’s good to see so many young people and families together with the flag of Brazil singing the national anthem, saying proudly ‘I’m Brazilian’ and advocating a better country. Brazil is proud of them.”

The Sports Minister, Aldo Rebelo, struck a harsher note, saying that protests that disrupted the Confederations Cup would not be tolerated. But already three cities – Recife, Porto Alegre and Cuiaba – all indicated they would cancel the increase in bus fares. But with more protests planned for the coming days, it is now far from clear if that will be enough to assuage the awakened anger of Brazil’s population.

Video: Protests in Brazil