Riot police in Brazil have fired tear gas to disperse thousands of people in Sao Paulo demonstrating against the cost of hosting the World Cup.

The tournament kicks off in the city on 12 June when the hosts play Croatia.

The protesters say they are angry that billions of Brazilian Real is being spent on the tournament, rather than on social projects and housing.

Protests took place in several of the other cites hosting games in the tournament, presenting a test for the country's security preparations.

A main thoroughfare in Sao Paulo, Brazil's largest city, was blocked with burning tyres. Protesters stormed a building in the capital Brasilia.

School teachers fresh from a vote to extend a strike joined other protesters in Rio de Janeiro, blocking traffic on several main streets before marching to city hall.

Crowds dispersed with little incident, but police sped the protest's end with tear gas and sporadic searches.

Looters took advantage of a three-day police strike in the northeastern city of Recife, which is also a World Cup venue. Supermarkets, shops and vehicles were ransacked.

The army and special national unit were called in to keep order. Police voted to end their strike last night.

Groups in Sao Paulo, including the Homeless Workers Movement, marched towards the World Cup stadium in Itaquera.

The stadium has become a target of protests because of the families displaced by its construction.

Protests are planned in up to 50 cities throughout the day, as demonstrators hope to rekindle momentum that led to millions of people hitting the streets last year during the Confederations Cup.

Last year's demonstrations prompted President Dilma Rousseff, who faces an election in October, to address the nation.

She acknowledged deficiencies in public services and investment in everything from education and healthcare to transportation and security.

In a speech yesterday, Ms Rousseff attacked critics of her government's World Cup preparations.

She called on the nation to welcome visitors with "the hospitality that is part of the Brazilian soul".