Protesters in Brazil have promised more organised action following clashes in which police in Sao Paulo set upon thousands of young demonstrators angered by rises in bus and subway fares.

Newspapers carried photos of bloodied protesters and journalists with battered, swollen faces, a young couple being beaten by police and videos of tear gas canisters and rubber bullets being fired into crowds chanting "no violence!" Protesters set fire to garbage bags piled in streets, broke windows and spray-painted graffiti on buildings and buses.

Protest organisers said more than 100 demonstrators were injured. Police would say only that 12 officers were hurt and more than 230 detained and later released in the Thursday night demonstrations in Sao Paulo.

There were similar protests in Rio de Janeiro, the capital Brasilia and in Porte Alegre in the south of the country.

The conflicts come just as the Confederations Cup football tournament opens and the nation prepares to host Pope Francis next month on his first international trip as pontiff.

The focus of the protests is a 10-cent rise in public transport fares. Protesters said the seemingly small increase released pent-up frustrations.

"It's about much more than those 10 cents. It's about a society that is sick of corrupt politicians not making good on their promises to make improvements," said Bruno Bisaglia, 24, who was gathering video testimony about the protests. "We want decent education, healthcare and transportation. That's what this fight is all about."

Sao Paulo's mayor, Fernando Haddad, said individual police officers "must be investigated" for using excessive force.

"Police always follow protocols. When these are followed, things go smoothly," Haddad told Globo TV. "But, according to images divulged by the press, the police yesterday apparently did not follow protocols, which is why the public safety department has ordered an investigation."

Sao Paulo state governor Geraldo Alckmin, who has authority over the police, told Globo an investigation was under way. But he defended the officers, saying that "police are obliged to protect the population and guarantee the right to come and go. We are always open to dialogue ... but will never tolerate vandalism."

Alckmin said the government has invited protest leaders for talks but that the protesters "don't want dialogue, they prefer monologues".

Police colonel Reinaldo Simoes Rossi, responsible for the officers policing the protest in Sao Paulo, said force was used only after demonstrators had altered an agreed route, instead moving toward main avenues in an attempt to halt traffic. He also said protesters hurled stones and other objects at police.

"The police guarantee the right to demonstrate, however it must also ensure the rights of the entire population, including the right to come and go. Any statements to the effect that police encouraged violence are completely unfounded," the police department said in a statement on Friday.

In the nation's capital, Brasilia, about 200 people burned tires and blocked the main road in front of the city's football stadium, which will host the Confederations Cup opener between Brazil on Japan on Saturday.

The protest was organised by local groups complaining of excessive costs of the Confederations Cup and the World Cup. Black smoke rose up near the stadium as protesters held aloft banners criticising the local government.

The road was opened again in the early afternoon.