Brazilian officials are bracing themselves for a wave of anti-government demonstrations in several cities, many in protest at the high spending on next month's World Cup.

Authorities said there were about 15 separate protests in Sao Paulo on Thursday. Most were gatherings of a few hundred people, although about 5000 demonstrators gathered near the Itaquerao soccer stadium in Sao Paulo, which is set to host the opening match of the World Cup.

People waved red banners and Brazilian flags as black smoke rose from burning tyres, spoiling the view of the stadium. Dozens of riot police blocked the main entrance next to a construction zone where cranes and other machines were lined up to carry materials still needed to finish the arena.

Groups also planned anti-government demonstrations in other cities hosting World Cup games. Some were called by two big unions that are demanding better wages and working conditions.

Testing the government

The demonstrations are being viewed as a test of the government's ability to contain protests ahead of football's flagship event.

Massive anti-government protests across Brazil last year overshadowed the Confederations Cup, a warm-up tournament to the World Cup, with more than a million people taking to the streets on a single night.

Many of the demonstrations turned violent. At least six people were killed in connection with the protests, most being run over by cars as rallies packed busy streets.

Brazilians are angry at the billions spent to host the World Cup, much of it on 12 ornate football stadiums, one-third of which critics say will see little use after the big event. Those who have taken to the streets want the government to focus on improving the country's health, education, security and infrastructure.

The government hopes that the World Cup and the 2016 Olympics in Rio will put Brazil in the global spotlight, showing advances the country has made in the past decade in improving its economy and pulling tens of millions of people out of poverty.