A protest in support of striking teachers has turned violent in Rio de Janeiro, as a group of anarchists threw firebombs at public buildings sparking clashes with riot police.

More than 10,000 people marched peacefully through Rio's city centre to back schoolteachers who have been on strike for weeks demanding better wages.

As night fell however, a few dozen anti-establishment "black bloc" anarchists violently hijacked the demonstration.

Their faces covered by scarfs and masks, the rioters smashed a gate of the City Hall, torched a bus and broke into banks, trying to open and set alight cashpoints in Rio's central business district.

Furniture from the banks was flung into the streets and used as barricade against riot police who fired teargas to break up the crowds.

"Without the police, there is no violence. When they are there, there always is," anarchist Hugo Cryois, 23, told the BBC. "You can't trust them".

Teachers have spent 52 days protesting new payroll and benefit packages backed by mayor Eduardo Paes.

Despite the protest Rio councillors approved the package last week. Clashes between demonstrators and police erupted as the vote was ongoing.

A wave of mass protests for social change has engulfed Brazil in recent months.

In June more than one million demonstrators took to the streets to protest against rising prices and corruption. The protesters called for a boycott of the 2014 World Cup, on which they say the government has spent billions of dollars while neglecting social and public services.

A demonstrator from the group called Black Bloc runs outside the City HallReuters
A riot policeman walks in front of a burning bus in Rio de JaneiroReuters
At least 10,000 people protested supporting a teachers' strike outside the City HallReuters
A demonstrator throws a piece of a wood at policeReuters
Portesters shout slogans during a protest in support of the teachers' strike in Rio de JaneiroReuters
A demonstrator holds up a placard that reads: "Assassin State"Reuters
Demonstrators from the group Black Bloc set fire to a bus during a protest in Rio de JaneiroReuters
A bus burns after demonstrators from the group Black Bloc set it ablazeReuters
Rioters smashed a gate of the City Hall and torched a busReuters